From 9595d8fe91e27cb046f053eb86711520826c5848 Mon Sep 17 00:00:00 2001 From: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> Date: Sun, 27 Oct 2024 09:39:08 +0100 Subject: [PATCH 1/2] fix serialize of regex --- client/ayon_core/lib/attribute_definitions.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/ayon_core/lib/attribute_definitions.py b/client/ayon_core/lib/attribute_definitions.py index 4877a45118..5daf646873 100644 --- a/client/ayon_core/lib/attribute_definitions.py +++ b/client/ayon_core/lib/attribute_definitions.py @@ -523,7 +523,10 @@ class TextDef(AbstractAttrDef): def serialize(self): data = super().serialize() - data["regex"] = self.regex.pattern + regex = None + if self.regex is not None: + regex = self.regex.pattern + data["regex"] = regex data["multiline"] = self.multiline data["placeholder"] = self.placeholder return data From ea2a9e0221bbfff11ce1c75e9f000ec5d4f1d33b Mon Sep 17 00:00:00 2001 From: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> Date: Mon, 28 Oct 2024 14:56:22 +0100 Subject: [PATCH 2/2] fix also label clone --- client/ayon_core/lib/attribute_definitions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/ayon_core/lib/attribute_definitions.py b/client/ayon_core/lib/attribute_definitions.py index 5daf646873..34956fd33f 100644 --- a/client/ayon_core/lib/attribute_definitions.py +++ b/client/ayon_core/lib/attribute_definitions.py @@ -327,8 +327,8 @@ class UISeparatorDef(UIDef): class UILabelDef(UIDef): type = "label" - def __init__(self, label, key=None): - super().__init__(label=label, key=key) + def __init__(self, label, key=None, *args, **kwargs): + super().__init__(label=label, key=key, *args, **kwargs) def _def_type_compare(self, other: "UILabelDef") -> bool: return self.label == other.label