From 05f6b0f2ce000910004c3ce9913e17ec528bc04b Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Mon, 15 Jul 2024 17:29:31 +0200 Subject: [PATCH] Log warning if `active` argument needs converting to bool --- client/ayon_core/pipeline/create/context.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/client/ayon_core/pipeline/create/context.py b/client/ayon_core/pipeline/create/context.py index 433142c51e..1c64d22733 100644 --- a/client/ayon_core/pipeline/create/context.py +++ b/client/ayon_core/pipeline/create/context.py @@ -2130,7 +2130,12 @@ class CreateContext: "variant": variant } if active is not None: - instance_data["active"] = bool(active) + if not isinstance(active, bool): + self.log.warning( + "CreateContext.create 'active' argument is not a bool. " + f"Converting {active} {type(active)} to bool.") + active = bool(active) + instance_data["active"] = active return creator.create( product_name,