From 65b3ca009fea4fae1aeaff5a43f67024d67ba60f Mon Sep 17 00:00:00 2001 From: Jiri Sindelar Date: Mon, 24 Mar 2025 10:38:11 +0100 Subject: [PATCH 1/2] Allow empty file representation --- client/ayon_core/pipeline/colorspace.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/client/ayon_core/pipeline/colorspace.py b/client/ayon_core/pipeline/colorspace.py index 8c4f97ab1c..3566cbdc45 100644 --- a/client/ayon_core/pipeline/colorspace.py +++ b/client/ayon_core/pipeline/colorspace.py @@ -1275,9 +1275,7 @@ def set_colorspace_data_to_representation( project_settings = context_data["project_settings"] # get one filename - filename = representation["files"] - if isinstance(filename, list): - filename = filename[0] + filename = representation["files"][0] if representation["files"] else None # get matching colorspace from rules if colorspace is None: From 29d899783cf883c3ff57480c24197edaf5fcb951 Mon Sep 17 00:00:00 2001 From: Jiri Sindelar <45896205+jrsndl@users.noreply.github.com> Date: Mon, 24 Mar 2025 11:11:51 +0100 Subject: [PATCH 2/2] Update client/ayon_core/pipeline/colorspace.py Co-authored-by: Roy Nieterau --- client/ayon_core/pipeline/colorspace.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/client/ayon_core/pipeline/colorspace.py b/client/ayon_core/pipeline/colorspace.py index 3566cbdc45..89b9bfce28 100644 --- a/client/ayon_core/pipeline/colorspace.py +++ b/client/ayon_core/pipeline/colorspace.py @@ -1275,7 +1275,12 @@ def set_colorspace_data_to_representation( project_settings = context_data["project_settings"] # get one filename - filename = representation["files"][0] if representation["files"] else None + filename = representation["files"] + if isinstance(filename, list): + if filename: + filename = filename[0] + else: + filename = None # get matching colorspace from rules if colorspace is None: