From eee55221a2ec5d2da55477cc786bad155fd4770e Mon Sep 17 00:00:00 2001 From: Jakub Trllo Date: Mon, 18 Mar 2024 15:43:33 +0100 Subject: [PATCH] fix cases when template key is name of the category --- client/ayon_core/pipeline/anatomy/templates.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client/ayon_core/pipeline/anatomy/templates.py b/client/ayon_core/pipeline/anatomy/templates.py index e9401c1501..7becb5026e 100644 --- a/client/ayon_core/pipeline/anatomy/templates.py +++ b/client/ayon_core/pipeline/anatomy/templates.py @@ -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: