mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 08:54:53 +01:00
added schema validation of dynamic schemas
This commit is contained in:
parent
37ef6d0223
commit
cf9114b0f1
1 changed files with 10 additions and 1 deletions
|
|
@ -253,9 +253,18 @@ class BaseItemEntity(BaseEntity):
|
|||
)
|
||||
|
||||
# Group item can be only once in on hierarchy branch.
|
||||
if self.is_group and self.group_item:
|
||||
if self.is_group and self.group_item is not None:
|
||||
raise SchemeGroupHierarchyBug(self)
|
||||
|
||||
# Group item can be only once in on hierarchy branch.
|
||||
if self.group_item is not None and self.is_dynamic_schema_node:
|
||||
reason = (
|
||||
"Dynamic schema is inside grouped item {}."
|
||||
" Change group hierarchy or remove dynamic"
|
||||
" schema to be able work properly."
|
||||
).format(self.group_item.path)
|
||||
raise EntitySchemaError(self, reason)
|
||||
|
||||
# Validate that env group entities will be stored into file.
|
||||
# - env group entities must store metadata which is not possible if
|
||||
# metadata would be outside of file
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue