From 37e7b31feb4f336a3e78c4c0eca9a80654b7fa77 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Wed, 27 Mar 2024 14:19:32 +0100 Subject: [PATCH] Refactor parent folder handling in validation plugin - Added comments to clarify the list of parents for context and folders. --- .../ayon_core/plugins/publish/validate_editorial_asset_name.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/ayon_core/plugins/publish/validate_editorial_asset_name.py b/client/ayon_core/plugins/publish/validate_editorial_asset_name.py index ad47d00006..f1a2eb38bb 100644 --- a/client/ayon_core/plugins/publish/validate_editorial_asset_name.py +++ b/client/ayon_core/plugins/publish/validate_editorial_asset_name.py @@ -23,7 +23,7 @@ class ValidateEditorialAssetName(pyblish.api.ContextPlugin): ] def process(self, context): - + # list of parents for current context, converted from folderPath folder_and_parents = self.get_parents(context) self.log.debug("__ folder_and_parents: {}".format(folder_and_parents)) @@ -35,6 +35,7 @@ class ValidateEditorialAssetName(pyblish.api.ContextPlugin): existing_folder_paths = { folder_entity["path"]: ( + # list of parents for current folder folder_entity["path"].lstrip("/").split("/")[:-1] ) for folder_entity in folder_entities