1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Fixes #4235: Fix API representation of content_type for export templates

This commit is contained in:
Jeremy Stretch
2020-02-21 14:38:38 -05:00
parent 45cdac6f36
commit 11d012de4e
3 changed files with 14 additions and 10 deletions

View File

@ -62,6 +62,9 @@ class RenderedGraphSerializer(serializers.ModelSerializer):
#
class ExportTemplateSerializer(ValidatedModelSerializer):
content_type = ContentTypeField(
queryset=ContentType.objects.filter(EXPORTTEMPLATE_MODELS),
)
template_language = ChoiceField(
choices=TemplateLanguageChoices,
default=TemplateLanguageChoices.LANGUAGE_JINJA2