From 68fc5b6e04b6e456c0487062ba68c89f421dc5b7 Mon Sep 17 00:00:00 2001 From: "robin@ynput.io" Date: Wed, 15 Apr 2026 14:30:29 -0400 Subject: [PATCH 1/2] Fix create_entity_list_item missing entityId. --- ayon_api/_api_helpers/lists.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ayon_api/_api_helpers/lists.py b/ayon_api/_api_helpers/lists.py index 6bab56f91..99a71dd04 100644 --- a/ayon_api/_api_helpers/lists.py +++ b/ayon_api/_api_helpers/lists.py @@ -342,9 +342,11 @@ def create_entity_list_item( """ if item_id is None: item_id = create_entity_id() + + data = data or {} kwargs = { "id": item_id, - "entityId": list_id, + "entityId": data.pop("entityId"), } for key, value in ( ("position", position), From 4e3c1e5977971f20560b4b05c910d08c351b7e5e Mon Sep 17 00:00:00 2001 From: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> Date: Thu, 16 Apr 2026 09:56:31 +0200 Subject: [PATCH 2/2] proper fix of the function --- ayon_api/_api.py | 3 +++ ayon_api/_api_helpers/lists.py | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) 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 99a71dd04..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. @@ -343,10 +345,9 @@ def create_entity_list_item( if item_id is None: item_id = create_entity_id() - data = data or {} kwargs = { "id": item_id, - "entityId": data.pop("entityId"), + "entityId": entity_id, } for key, value in ( ("position", position),