Sfoglia il codice sorgente

Fixes #4150: Replace OrderedDict with Dict when rendering YAML

Saria Hajjar 6 anni fa
parent
commit
8eea0331bf
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  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()