mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
#3892: Convert EXPORTTEMPLATE_MODELS to a Q object
This commit is contained in:
@@ -482,15 +482,11 @@ class Graph(models.Model):
|
||||
# Export templates
|
||||
#
|
||||
|
||||
def get_export_template_models():
|
||||
return model_names_to_filter_dict(EXPORTTEMPLATE_MODELS)
|
||||
|
||||
|
||||
class ExportTemplate(models.Model):
|
||||
content_type = models.ForeignKey(
|
||||
to=ContentType,
|
||||
on_delete=models.CASCADE,
|
||||
limit_choices_to=get_export_template_models
|
||||
limit_choices_to=EXPORTTEMPLATE_MODELS
|
||||
)
|
||||
name = models.CharField(
|
||||
max_length=100
|
||||
|
||||
Reference in New Issue
Block a user