Browse Source

12008 make export templates cloneable

Arthur 2 years ago
parent
commit
835af32213
1 changed files with 5 additions and 1 deletions
  1. 5 1
      netbox/extras/models/models.py

+ 5 - 1
netbox/extras/models/models.py

@@ -280,7 +280,7 @@ class CustomLink(CloningMixin, ExportTemplatesMixin, WebhooksMixin, ChangeLogged
         }
 
 
-class ExportTemplate(ExportTemplatesMixin, WebhooksMixin, ChangeLoggedModel):
+class ExportTemplate(CloningMixin, ExportTemplatesMixin, WebhooksMixin, ChangeLoggedModel):
     content_types = models.ManyToManyField(
         to=ContentType,
         related_name='export_templates',
@@ -313,6 +313,10 @@ class ExportTemplate(ExportTemplatesMixin, WebhooksMixin, ChangeLoggedModel):
         help_text=_("Download file as attachment")
     )
 
+    clone_fields = (
+        'content_types', 'template_code', 'mime_type', 'file_extension', 'as_attachment',
+    )
+
     class Meta:
         ordering = ('name',)