From 1b3a08af0189d649ab7eb413bf8b526784405401 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Tue, 27 May 2025 10:07:55 +0200 Subject: [PATCH] Revert exclude family check to maintain old behavior --- client/ayon_core/plugins/publish/cleanup.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/client/ayon_core/plugins/publish/cleanup.py b/client/ayon_core/plugins/publish/cleanup.py index 109dc55c1d..53f1dea071 100644 --- a/client/ayon_core/plugins/publish/cleanup.py +++ b/client/ayon_core/plugins/publish/cleanup.py @@ -72,8 +72,13 @@ class CleanUp(pyblish.api.InstancePlugin): self.log.debug("Cleaning renders new...") self.clean_renders(instance, skip_cleanup_filepaths) + # TODO: Figure out whether this could be refactored to just a + # product_type in self.exclude_families check. product_type = instance.data["productType"] - if product_type in self.exclude_families: + if any( + exclude_family in product_type + for exclude_family in self.exclude_families + ): self.log.debug( "Skipping cleanup for instance because product " f"type is excluded from cleanup: {product_type}")