From 582dce426fb2005fe8878e69a5f191a87ba4e073 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Thu, 21 Nov 2024 12:35:24 +0100 Subject: [PATCH 1/4] Fix typo --- client/ayon_core/tools/creator/widgets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/ayon_core/tools/creator/widgets.py b/client/ayon_core/tools/creator/widgets.py index 53a2ee1080..09f4e1fa32 100644 --- a/client/ayon_core/tools/creator/widgets.py +++ b/client/ayon_core/tools/creator/widgets.py @@ -104,7 +104,7 @@ def __init__(self): def validate(self, text, pos): results = super(ProductNameValidator, self).validate(text, pos) - if results[0] == self.Invalid: + if results[0] == self.invalid: self.invalid.emit(self.invalid_chars(text)) return results From 5ccdfc258a97e519e97cac5ac0d254678f27f1aa Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Thu, 21 Nov 2024 12:36:21 +0100 Subject: [PATCH 2/4] Fix plugins returning empty list --- client/ayon_core/tools/pyblish_pype/model.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/ayon_core/tools/pyblish_pype/model.py b/client/ayon_core/tools/pyblish_pype/model.py index 3a402f386e..7c242c817a 100644 --- a/client/ayon_core/tools/pyblish_pype/model.py +++ b/client/ayon_core/tools/pyblish_pype/model.py @@ -780,6 +780,8 @@ def restore_checkstates(self): def update_with_result(self, result): instance = result["instance"] + if isinstance(instance, list): + instance = instance.pop() if instance else None if instance is None: instance_id = self.controller.context.id else: @@ -976,6 +978,8 @@ def prepare_records(self, result, suspend_logs): prepared_records = [] instance_name = None instance = result["instance"] + if isinstance(instance, list): + instance = instance.pop() if instance else None if instance is not None: instance_name = instance.data["name"] From 0c5777910a7e96acde12cdf11b7df86d67e6a5e2 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Thu, 21 Nov 2024 14:26:07 +0100 Subject: [PATCH 3/4] Revert "Fix plugins returning empty list" This reverts commit 5ccdfc258a97e519e97cac5ac0d254678f27f1aa. --- client/ayon_core/tools/pyblish_pype/model.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/client/ayon_core/tools/pyblish_pype/model.py b/client/ayon_core/tools/pyblish_pype/model.py index 7c242c817a..3a402f386e 100644 --- a/client/ayon_core/tools/pyblish_pype/model.py +++ b/client/ayon_core/tools/pyblish_pype/model.py @@ -780,8 +780,6 @@ def restore_checkstates(self): def update_with_result(self, result): instance = result["instance"] - if isinstance(instance, list): - instance = instance.pop() if instance else None if instance is None: instance_id = self.controller.context.id else: @@ -978,8 +976,6 @@ def prepare_records(self, result, suspend_logs): prepared_records = [] instance_name = None instance = result["instance"] - if isinstance(instance, list): - instance = instance.pop() if instance else None if instance is not None: instance_name = instance.data["name"] From 962df74e640f9661489b2ac6433a55d913fcd07d Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Thu, 21 Nov 2024 14:27:06 +0100 Subject: [PATCH 4/4] Better RegularExpressionValidatorClass.Invalid used --- client/ayon_core/tools/creator/widgets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/ayon_core/tools/creator/widgets.py b/client/ayon_core/tools/creator/widgets.py index 09f4e1fa32..96ce899881 100644 --- a/client/ayon_core/tools/creator/widgets.py +++ b/client/ayon_core/tools/creator/widgets.py @@ -104,7 +104,7 @@ def __init__(self): def validate(self, text, pos): results = super(ProductNameValidator, self).validate(text, pos) - if results[0] == self.invalid: + if results[0] == RegularExpressionValidatorClass.Invalid: self.invalid.emit(self.invalid_chars(text)) return results