♻️ remove check for attribute

This commit is contained in:
Ondřej Samohel 2025-06-10 11:23:37 +02:00
parent 7f21d39d81
commit da286e3cfb
No known key found for this signature in database
GPG key ID: 02376E18990A97C6

View file

@ -1201,15 +1201,14 @@ class CreateContext:
# remove this check.
if is_product_base_type_supported():
if hasattr(creator, "product_base_type"):
instance_data["productBaseType"] = creator.product_base_type
else:
warn(
f"Creator {creator_identifier} does not support "
"product base type. This will be required in future.",
DeprecationWarning,
stacklevel=2,
instance_data["productBaseType"] = creator.product_base_type
if creator.product_base_type is None:
msg = (
f"Creator {creator_identifier} does not set "
"product base type. This will be required in future."
)
warn(msg, DeprecationWarning, stacklevel=2)
self.log.warning(msg)
if active is not None:
if not isinstance(active, bool):