mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-13 23:32:17 -06:00
Merge branch 'develop' into feature
This commit is contained in:
@@ -372,13 +372,11 @@ class CustomField(CloningMixin, ExportTemplatesMixin, ChangeLoggedModel):
|
||||
if self.type in (CustomFieldTypeChoices.TYPE_OBJECT, CustomFieldTypeChoices.TYPE_MULTIOBJECT):
|
||||
if not self.related_object_type:
|
||||
raise ValidationError({
|
||||
'object_type': _("Object fields must define an object type.")
|
||||
'related_object_type': _("Object fields must define an object type.")
|
||||
})
|
||||
elif self.related_object_type:
|
||||
raise ValidationError({
|
||||
'object_type': _(
|
||||
"{type} fields may not define an object type.")
|
||||
.format(type=self.get_type_display())
|
||||
'type': _("{type} fields may not define an object type.") .format(type=self.get_type_display())
|
||||
})
|
||||
|
||||
# Related object filter can be set only for object-type fields, and must contain a dictionary mapping (if set)
|
||||
|
||||
Reference in New Issue
Block a user