mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
Log warning if active argument needs converting to bool
This commit is contained in:
parent
c5e699a159
commit
05f6b0f2ce
1 changed files with 6 additions and 1 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue