diff --git a/netbox_custom_objects/constants.py b/netbox_custom_objects/constants.py index 5ae577e..ef5bc60 100644 --- a/netbox_custom_objects/constants.py +++ b/netbox_custom_objects/constants.py @@ -6,19 +6,3 @@ ) APP_LABEL = "netbox_custom_objects" - -# Field names that are reserved and cannot be used for custom object fields -RESERVED_FIELD_NAMES = [ - "bookmarks", - "contacts", - "created", - "custom_field_data", - "id", - "images", - "jobs", - "journal_entries", - "last_updated", - "pk", - "subscriptions", - "tags", -] diff --git a/netbox_custom_objects/models.py b/netbox_custom_objects/models.py index cd089c4..11e1711 100644 --- a/netbox_custom_objects/models.py +++ b/netbox_custom_objects/models.py @@ -49,7 +49,7 @@ from utilities.string import title from utilities.validators import validate_regex -from netbox_custom_objects.constants import APP_LABEL, RESERVED_FIELD_NAMES +from netbox_custom_objects.constants import APP_LABEL from netbox_custom_objects.field_types import FIELD_TYPE_CLASS @@ -813,16 +813,6 @@ def related_object_type_label(self): def clean(self): super().clean() - # Check if the field name is reserved - if self.name in RESERVED_FIELD_NAMES: - raise ValidationError( - { - "name": _( - 'Field name "{name}" is reserved and cannot be used. Reserved names are: {reserved_names}' - ).format(name=self.name, reserved_names=", ".join(RESERVED_FIELD_NAMES)) - } - ) - # Validate the field's default value (if any) if self.default is not None: try: