From 43df06f21056329b87c735d7b05066cc38d2f6bb Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Fri, 6 Jun 2025 14:25:19 -0400 Subject: [PATCH] Fixes #19667: Fix TypeError exception when creating a new module profile type with no schema (#19671) --- 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: