Sfoglia il codice sorgente

Fix SVG rendering with unspecified width

jeremystretch 4 anni fa
parent
commit
443172197b
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      netbox/dcim/api/views.py

+ 1 - 1
netbox/dcim/api/views.py

@@ -54,7 +54,7 @@ class PathEndpointMixin(object):
             # Render SVG
             try:
                 width = min(int(request.GET.get('width')), 1600)
-            except ValueError:
+            except (ValueError, TypeError):
                 width = None
             drawing = obj.get_trace_svg(
                 base_url=request.build_absolute_uri('/'),