mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Note that 'table' is a reserved name for ExportTemplates
This commit is contained in:
@@ -261,7 +261,15 @@ class ExportTemplate(BigIDModel):
|
||||
]
|
||||
|
||||
def __str__(self):
|
||||
return '{}: {}'.format(self.content_type, self.name)
|
||||
return f"{self.content_type}: {self.name}"
|
||||
|
||||
def clean(self):
|
||||
super().clean()
|
||||
|
||||
if self.name.lower() == 'table':
|
||||
raise ValidationError({
|
||||
'name': f'"{self.name}" is a reserved name. Please choose a different name.'
|
||||
})
|
||||
|
||||
def render(self, queryset):
|
||||
"""
|
||||
|
Reference in New Issue
Block a user