mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
fix cases when template key is name of the category
This commit is contained in:
parent
bf60b264de
commit
eee55221a2
1 changed files with 6 additions and 0 deletions
|
|
@ -372,6 +372,12 @@ class TemplateCategory:
|
|||
"""
|
||||
if key in self._category_data:
|
||||
return key
|
||||
|
||||
# Use default when the key is the category name
|
||||
if key == self._name:
|
||||
return "default"
|
||||
|
||||
# Remove prefix if is key prefixed
|
||||
if key.startswith(self._name_prefix):
|
||||
new_key = key[len(self._name_prefix):]
|
||||
if new_key in self._category_data:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue