mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-13 08:44:51 -06:00
Fixes #19667: Fix TypeError exception when creating a new module profile type with no schema (#19671)
This commit is contained in:
parent
0e68901022
commit
43df06f210
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user