mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-22 20:12:00 -06:00
Fix bug left over from work on #3569
This commit is contained in:
parent
577b4593de
commit
590bbbce7f
@ -506,11 +506,11 @@ class ExportTemplate(models.Model):
|
||||
'queryset': queryset
|
||||
}
|
||||
|
||||
if self.template_language == TEMPLATE_LANGUAGE_DJANGO:
|
||||
if self.template_language == ExportTemplateLanguageChoices.LANGUAGE_DJANGO:
|
||||
template = Template(self.template_code)
|
||||
output = template.render(Context(context))
|
||||
|
||||
elif self.template_language == TEMPLATE_LANGUAGE_JINJA2:
|
||||
elif self.template_language == ExportTemplateLanguageChoices.LANGUAGE_JINJA2:
|
||||
template = Environment().from_string(source=self.template_code)
|
||||
output = template.render(**context)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user