mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-13 23:32:17 -06:00
* Translations cleanup * Tweak variable names; misc string cleanup * Misc cleanup
This commit is contained in:
@@ -287,8 +287,8 @@ class CustomField(CloningMixin, ExportTemplatesMixin, ChangeLoggedModel):
|
||||
except ValidationError as err:
|
||||
raise ValidationError({
|
||||
'default': _(
|
||||
'Invalid default value "{default}": {message}'
|
||||
).format(default=self.default, message=err.message)
|
||||
'Invalid default value "{value}": {error}'
|
||||
).format(value=self.default, error=err.message)
|
||||
})
|
||||
|
||||
# Minimum/maximum values can be set only for numeric fields
|
||||
@@ -332,8 +332,8 @@ class CustomField(CloningMixin, ExportTemplatesMixin, ChangeLoggedModel):
|
||||
elif self.object_type:
|
||||
raise ValidationError({
|
||||
'object_type': _(
|
||||
"{type_display} fields may not define an object type.")
|
||||
.format(type_display=self.get_type_display())
|
||||
"{type} fields may not define an object type.")
|
||||
.format(type=self.get_type_display())
|
||||
})
|
||||
|
||||
def serialize(self, value):
|
||||
|
||||
Reference in New Issue
Block a user