diff --git a/ayon_api/_api.py b/ayon_api/_api.py index 87437368f..98e794203 100644 --- a/ayon_api/_api.py +++ b/ayon_api/_api.py @@ -7710,6 +7710,7 @@ def set_entity_list_attribute_definitions( def create_entity_list_item( project_name: str, list_id: str, + entity_id: str, *, position: Optional[int] = None, label: Optional[str] = None, @@ -7723,6 +7724,7 @@ def create_entity_list_item( Args: project_name (str): Project name where entity list lives. list_id (str): Entity list id where item will be added. + entity_id (str): Id of entity added to the list. position (Optional[int]): Position of item in entity list. label (Optional[str]): Label of item in entity list. attrib (Optional[dict[str, Any]]): Item attribute values. @@ -7738,6 +7740,7 @@ def create_entity_list_item( return con.create_entity_list_item( project_name=project_name, list_id=list_id, + entity_id=entity_id, position=position, label=label, attrib=attrib, diff --git a/ayon_api/_api_helpers/lists.py b/ayon_api/_api_helpers/lists.py index 6bab56f91..17827266d 100644 --- a/ayon_api/_api_helpers/lists.py +++ b/ayon_api/_api_helpers/lists.py @@ -316,6 +316,7 @@ def create_entity_list_item( self, project_name: str, list_id: str, + entity_id: str, *, position: Optional[int] = None, label: Optional[str] = None, @@ -329,6 +330,7 @@ def create_entity_list_item( Args: project_name (str): Project name where entity list lives. list_id (str): Entity list id where item will be added. + entity_id (str): Id of entity added to the list. position (Optional[int]): Position of item in entity list. label (Optional[str]): Label of item in entity list. attrib (Optional[dict[str, Any]]): Item attribute values. @@ -342,9 +344,10 @@ def create_entity_list_item( """ if item_id is None: item_id = create_entity_id() + kwargs = { "id": item_id, - "entityId": list_id, + "entityId": entity_id, } for key, value in ( ("position", position),