Fixes #19667: Fix TypeError exception when creating a new module profile type with no schema (#19671)

This commit is contained in:
Jeremy Stretch 2025-06-06 14:25:19 -04:00 committed by GitHub
parent 0e68901022
commit 43df06f210
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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: