mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-14 01:41:22 -06:00
Closes #3085: Catch all exceptions during export template rendering
This commit is contained in:
parent
eb41bc66a4
commit
244c07e5f7
@ -1,5 +1,9 @@
|
|||||||
2.5.13 (FUTURE)
|
2.5.13 (FUTURE)
|
||||||
|
|
||||||
|
## Enhancements
|
||||||
|
|
||||||
|
* [#3085](https://github.com/digitalocean/netbox/issues/3085) - Catch all exceptions during export template rendering
|
||||||
|
|
||||||
## Bug Fixes
|
## Bug Fixes
|
||||||
|
|
||||||
* [#3132](https://github.com/digitalocean/netbox/issues/3132) - Circuit termination missing from available cable termination types
|
* [#3132](https://github.com/digitalocean/netbox/issues/3132) - Circuit termination missing from available cable termination types
|
||||||
|
@ -126,10 +126,12 @@ class ObjectListView(View):
|
|||||||
queryset = CustomFieldQueryset(self.queryset, custom_fields) if custom_fields else self.queryset
|
queryset = CustomFieldQueryset(self.queryset, custom_fields) if custom_fields else self.queryset
|
||||||
try:
|
try:
|
||||||
return et.render_to_response(queryset)
|
return et.render_to_response(queryset)
|
||||||
except TemplateSyntaxError:
|
except Exception as e:
|
||||||
messages.error(
|
messages.error(
|
||||||
request,
|
request,
|
||||||
"There was an error rendering the selected export template ({}).".format(et.name)
|
"There was an error rendering the selected export template ({}): {}".format(
|
||||||
|
et.name, e
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
# Fall back to built-in CSV formatting if export requested but no template specified
|
# Fall back to built-in CSV formatting if export requested but no template specified
|
||||||
|
Loading…
Reference in New Issue
Block a user