mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 13:24:54 +01:00
added key validation to roots entity
This commit is contained in:
parent
48a300cfc3
commit
f5e9096fdc
1 changed files with 10 additions and 2 deletions
|
|
@ -13,11 +13,15 @@ from .lib import (
|
|||
get_studio_settings_schema,
|
||||
get_project_settings_schema
|
||||
)
|
||||
from .exceptions import EntitySchemaError
|
||||
from .exceptions import (
|
||||
EntitySchemaError,
|
||||
InvalidKeySymbols
|
||||
)
|
||||
from pype.settings.constants import (
|
||||
SYSTEM_SETTINGS_KEY,
|
||||
PROJECT_SETTINGS_KEY,
|
||||
PROJECT_ANATOMY_KEY
|
||||
PROJECT_ANATOMY_KEY,
|
||||
KEY_REGEX
|
||||
)
|
||||
|
||||
from pype.settings.lib import (
|
||||
|
|
@ -153,6 +157,10 @@ class RootEntity(BaseItemEntity):
|
|||
raise EntitySchemaError(self, reason)
|
||||
child_entity.schema_validations()
|
||||
|
||||
for key in self.non_gui_children.keys():
|
||||
if not KEY_REGEX.match(key):
|
||||
raise InvalidKeySymbols(self.path, key)
|
||||
|
||||
def get_entity_from_path(self, path):
|
||||
"""Return system settings entity."""
|
||||
raise NotImplementedError((
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue