From f7920dc66d2ab9e89b1109f94df79afc0e41c9e2 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Fri, 6 Jun 2025 12:03:59 -0400 Subject: [PATCH] Fixes #19667: Fix TypeError exception when creating a new module profile type with no schema --- netbox/dcim/models/modules.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox/dcim/models/modules.py b/netbox/dcim/models/modules.py index c5830f1db..f60162fe9 100644 --- a/netbox/dcim/models/modules.py +++ b/netbox/dcim/models/modules.py @@ -144,7 +144,7 @@ class ModuleType(ImageAttachmentsMixin, PrimaryModel, WeightMixin): super().clean() # Validate any attributes against the assigned profile's schema - if self.profile: + if self.profile and self.profile.schema: try: jsonschema.validate(self.attribute_data, schema=self.profile.schema) except JSONValidationError as e: