Skip to content

Commit 929befc

Browse files
authored
Merge pull request #323 from ynput/bugfix/fix_create_entity_list_item
Add missing entity id argument to `create_entity_list_item`
2 parents 4686d03 + 4e3c1e5 commit 929befc

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

ayon_api/_api.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7710,6 +7710,7 @@ def set_entity_list_attribute_definitions(
77107710
def create_entity_list_item(
77117711
project_name: str,
77127712
list_id: str,
7713+
entity_id: str,
77137714
*,
77147715
position: Optional[int] = None,
77157716
label: Optional[str] = None,
@@ -7723,6 +7724,7 @@ def create_entity_list_item(
77237724
Args:
77247725
project_name (str): Project name where entity list lives.
77257726
list_id (str): Entity list id where item will be added.
7727+
entity_id (str): Id of entity added to the list.
77267728
position (Optional[int]): Position of item in entity list.
77277729
label (Optional[str]): Label of item in entity list.
77287730
attrib (Optional[dict[str, Any]]): Item attribute values.
@@ -7738,6 +7740,7 @@ def create_entity_list_item(
77387740
return con.create_entity_list_item(
77397741
project_name=project_name,
77407742
list_id=list_id,
7743+
entity_id=entity_id,
77417744
position=position,
77427745
label=label,
77437746
attrib=attrib,

ayon_api/_api_helpers/lists.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,7 @@ def create_entity_list_item(
316316
self,
317317
project_name: str,
318318
list_id: str,
319+
entity_id: str,
319320
*,
320321
position: Optional[int] = None,
321322
label: Optional[str] = None,
@@ -329,6 +330,7 @@ def create_entity_list_item(
329330
Args:
330331
project_name (str): Project name where entity list lives.
331332
list_id (str): Entity list id where item will be added.
333+
entity_id (str): Id of entity added to the list.
332334
position (Optional[int]): Position of item in entity list.
333335
label (Optional[str]): Label of item in entity list.
334336
attrib (Optional[dict[str, Any]]): Item attribute values.
@@ -342,9 +344,10 @@ def create_entity_list_item(
342344
"""
343345
if item_id is None:
344346
item_id = create_entity_id()
347+
345348
kwargs = {
346349
"id": item_id,
347-
"entityId": list_id,
350+
"entityId": entity_id,
348351
}
349352
for key, value in (
350353
("position", position),

0 commit comments

Comments
 (0)