Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ayon_api/_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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.
Expand All @@ -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,
Expand Down
5 changes: 4 additions & 1 deletion ayon_api/_api_helpers/lists.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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.
Expand All @@ -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),
Expand Down
Loading