diff --git a/client/ayon_core/lib/attribute_definitions.py b/client/ayon_core/lib/attribute_definitions.py index 01f5606f17..dd467797f1 100644 --- a/client/ayon_core/lib/attribute_definitions.py +++ b/client/ayon_core/lib/attribute_definitions.py @@ -183,6 +183,11 @@ class AbstractAttrDef(metaclass=AbstractAttrDefMeta): def id(self) -> str: return self._id + def clone(self): + data = self.serialize() + data.pop("type") + return self.deserialize(data) + @property def hidden(self) -> bool: return not self.visible @@ -275,6 +280,9 @@ class AbstractAttrDef(metaclass=AbstractAttrDefMeta): Data can be received using 'serialize' method. """ + if "type" in data: + data = dict(data) + data.pop("type") return cls(**data)