From 6ff0ce283ba8350e8c964136ed87d138c843464f Mon Sep 17 00:00:00 2001 From: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> Date: Thu, 16 Jan 2025 12:24:21 +0100 Subject: [PATCH] Revert "Chore: Avoid knowledge about render job id in metadata file" --- .../ayon_core/plugins/publish/collect_rendered_files.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/client/ayon_core/plugins/publish/collect_rendered_files.py b/client/ayon_core/plugins/publish/collect_rendered_files.py index deecf7ba24..42ba096d14 100644 --- a/client/ayon_core/plugins/publish/collect_rendered_files.py +++ b/client/ayon_core/plugins/publish/collect_rendered_files.py @@ -93,7 +93,8 @@ class CollectRenderedFiles(pyblish.api.ContextPlugin): # now we can just add instances from json file and we are done any_staging_dir_persistent = False - for instance_data in data["instances"]: + for instance_data in data.get("instances"): + self.log.debug(" - processing instance for {}".format( instance_data.get("productName"))) instance = self._context.create_instance( @@ -104,11 +105,7 @@ class CollectRenderedFiles(pyblish.api.ContextPlugin): instance.data.update(instance_data) # stash render job id for later validation - instance.data["publishJobMetadata"] = data - # TODO remove 'render_job_id' here and rather use - # 'publishJobMetadata' where is needed. - # - this is deadline specific - instance.data["render_job_id"] = data.get("job", {}).get("_id") + instance.data["render_job_id"] = data.get("job").get("_id") staging_dir_persistent = instance.data.get( "stagingDir_persistent", False )