Update client/ayon_core/pipeline/publish/lib.py

Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com>
This commit is contained in:
Ondřej Samohel 2025-05-13 12:17:01 +02:00 committed by GitHub
parent 54c10cd6da
commit ae9c6d4218
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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(