Explorar el Código

Fixes #4150: Replace OrderedDict with Dict when rendering YAML

Saria Hajjar hace 6 años
padre
commit
8eea0331bf
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      netbox/utilities/templatetags/helpers.py

+ 1 - 1
netbox/utilities/templatetags/helpers.py

@@ -82,7 +82,7 @@ def render_yaml(value):
     """
     Render a dictionary as formatted YAML.
     """
-    return yaml.dump(dict(value))
+    return yaml.dump(json.loads(json.dumps(value)))
 
 
 @register.filter()