mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 08:54:53 +01:00
list entity can use templates or schemas
This commit is contained in:
parent
04e045ddbf
commit
08e8f60161
1 changed files with 15 additions and 1 deletions
|
|
@ -141,7 +141,21 @@ class ListEntity(EndpointEntity):
|
|||
item_schema = self.schema_data["object_type"]
|
||||
if not isinstance(item_schema, dict):
|
||||
item_schema = {"type": item_schema}
|
||||
self.item_schema = item_schema
|
||||
|
||||
schema_template_used = False
|
||||
_item_schemas = self.schema_hub.resolve_schema_data(item_schema)
|
||||
if len(_item_schemas) == 1:
|
||||
self.item_schema = _item_schemas[0]
|
||||
if self.item_schema != item_schema:
|
||||
schema_template_used = True
|
||||
if "label" in self.item_schema:
|
||||
self.item_schema.pop("label")
|
||||
self.item_schema["use_label_wrap"] = False
|
||||
else:
|
||||
self.item_schema = _item_schemas
|
||||
|
||||
# Store if was used template or schema
|
||||
self._schema_template_used = schema_template_used
|
||||
|
||||
if self.group_item is None:
|
||||
self.is_group = True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue