mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-26 05:42:15 +01:00
added file item validation for list strict item
This commit is contained in:
parent
68ff323978
commit
95d158d557
2 changed files with 10 additions and 1 deletions
|
|
@ -101,7 +101,7 @@ class InputEntity(EndpointEntity):
|
|||
"{}: Missing parent file entity.".format(self.path)
|
||||
)
|
||||
|
||||
super(EndpointEntity, self).schema_validations()
|
||||
super(InputEntity, self).schema_validations()
|
||||
|
||||
@property
|
||||
def value(self):
|
||||
|
|
|
|||
|
|
@ -206,6 +206,15 @@ class ListStrictEntity(ItemEntity):
|
|||
if not self.group_item and not self.is_group:
|
||||
self.is_group = True
|
||||
|
||||
def schema_validations(self):
|
||||
# List entity must have file parent.
|
||||
if not self.file_item and not self.is_file:
|
||||
raise ValueError(
|
||||
"{}: Missing file entity in hierarchy.".format(self.path)
|
||||
)
|
||||
|
||||
super(ListStrictEntity, self).schema_validations()
|
||||
|
||||
def get_child_path(self, child_obj):
|
||||
result_idx = None
|
||||
for idx, _child_obj in enumerate(self.children):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue