mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-21 19:18:44 -06:00
Closes #19377: Introduce config context profiles (#20058)
Some checks failed
CodeQL / Analyze (${{ matrix.language }}) (none, python) (push) Has been cancelled
CodeQL / Analyze (${{ matrix.language }}) (none, actions) (push) Has been cancelled
CodeQL / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Has been cancelled
CI / build (20.x, 3.10) (push) Has been cancelled
CI / build (20.x, 3.11) (push) Has been cancelled
CI / build (20.x, 3.12) (push) Has been cancelled
Some checks failed
CodeQL / Analyze (${{ matrix.language }}) (none, python) (push) Has been cancelled
CodeQL / Analyze (${{ matrix.language }}) (none, actions) (push) Has been cancelled
CodeQL / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Has been cancelled
CI / build (20.x, 3.10) (push) Has been cancelled
CI / build (20.x, 3.11) (push) Has been cancelled
CI / build (20.x, 3.12) (push) Has been cancelled
This commit is contained in:
@@ -36,7 +36,8 @@ class ModuleTypeProfile(PrimaryModel):
|
||||
schema = models.JSONField(
|
||||
blank=True,
|
||||
null=True,
|
||||
verbose_name=_('schema')
|
||||
validators=[validate_schema],
|
||||
verbose_name=_('schema'),
|
||||
)
|
||||
|
||||
clone_fields = ('schema',)
|
||||
@@ -49,18 +50,6 @@ class ModuleTypeProfile(PrimaryModel):
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
def clean(self):
|
||||
super().clean()
|
||||
|
||||
# Validate the schema definition
|
||||
if self.schema is not None:
|
||||
try:
|
||||
validate_schema(self.schema)
|
||||
except ValidationError as e:
|
||||
raise ValidationError({
|
||||
'schema': e.message,
|
||||
})
|
||||
|
||||
|
||||
class ModuleType(ImageAttachmentsMixin, PrimaryModel, WeightMixin):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user