Skip to content

Commit cec7426

Browse files
Fix ordering dictionary bug
When we only have one item in a dict, there are no ordering edges, but we should still emit the one node. Fixes #52
1 parent 3c6d019 commit cec7426

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

record_api/apis.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ def possibly_order_dict(
710710
"""
711711
Resort dict by topographical sorting of order
712712
"""
713-
return {k: d[k] for k in networkx.topological_sort(networkx.DiGraph(order))}
713+
return {k: d[k] for k in networkx.topological_sort(networkx.DiGraph(order))} or d
714714

715715

716716
def unify_named_types(

0 commit comments

Comments
 (0)