mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
modifiable dict method _add_key may be forced to ignore invalid key
This commit is contained in:
parent
2ae5d66f51
commit
e76e2fd60c
1 changed files with 6 additions and 2 deletions
|
|
@ -131,11 +131,15 @@ class DictMutableKeysEntity(EndpointEntity):
|
|||
self._has_project_override = True
|
||||
self.on_change()
|
||||
|
||||
def _add_key(self, key):
|
||||
def _add_key(self, key, _ingore_key_validation=False):
|
||||
if key in self.children_by_key:
|
||||
self.pop(key)
|
||||
|
||||
if not self.store_as_list and not KEY_REGEX.match(key):
|
||||
if (
|
||||
not _ingore_key_validation
|
||||
and not self.store_as_list
|
||||
and not KEY_REGEX.match(key)
|
||||
):
|
||||
raise InvalidKeySymbols(self.path, key)
|
||||
|
||||
if self.value_is_env_group:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue