From ae9c6d4218e1c67f1ebba63d6412ef0648bf8067 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Samohel?= <33513211+antirotor@users.noreply.github.com> Date: Tue, 13 May 2025 12:17:01 +0200 Subject: [PATCH] Update client/ayon_core/pipeline/publish/lib.py Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> --- client/ayon_core/pipeline/publish/lib.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/client/ayon_core/pipeline/publish/lib.py b/client/ayon_core/pipeline/publish/lib.py index 85b70f11be..f5d5d8acdb 100644 --- a/client/ayon_core/pipeline/publish/lib.py +++ b/client/ayon_core/pipeline/publish/lib.py @@ -1097,9 +1097,8 @@ def add_trait_representations( trait based representations to add. """ - if not has_trait_representations(instance): - instance.data[TRAIT_INSTANCE_KEY] = [] - instance.data[TRAIT_INSTANCE_KEY].extend(representations) + repres = instance.data.setdefault(TRAIT_INSTANCE_KEY, []) + repres.extend(representations) def set_trait_representations(