Skip to content

Commit 835af32

Browse files
arthansonjeremystretch
authored andcommitted
12008 make export templates cloneable
1 parent 571d33e commit 835af32

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

netbox/extras/models/models.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ def render(self, context):
280280
}
281281

282282

283-
class ExportTemplate(ExportTemplatesMixin, WebhooksMixin, ChangeLoggedModel):
283+
class ExportTemplate(CloningMixin, ExportTemplatesMixin, WebhooksMixin, ChangeLoggedModel):
284284
content_types = models.ManyToManyField(
285285
to=ContentType,
286286
related_name='export_templates',
@@ -313,6 +313,10 @@ class ExportTemplate(ExportTemplatesMixin, WebhooksMixin, ChangeLoggedModel):
313313
help_text=_("Download file as attachment")
314314
)
315315

316+
clone_fields = (
317+
'content_types', 'template_code', 'mime_type', 'file_extension', 'as_attachment',
318+
)
319+
316320
class Meta:
317321
ordering = ('name',)
318322

0 commit comments

Comments
 (0)