Skip to content

Commit

Permalink
Merge branch '0.8-dev' into add_update
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelma committed Nov 24, 2023
2 parents 83f94e3 + 04c38da commit efb8808
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spinedb_api/export_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ def export_superclass_subclasses(db_map, ids=Asterisk):

def export_entities(db_map, ids=Asterisk):
return sorted(
((x.class_name, x.name, x.element_name_list, x.description) for x in _get_items(db_map, "entity", ids)),
key=lambda x: (len(x[2]), x[0], x[2], x[1]),
((x.class_name, x.element_name_list or x.name, x.description) for x in _get_items(db_map, "entity", ids)),
key=lambda x: (0 if isinstance(x[1], str) else len(x[1]), x[0], (x[1],) if isinstance(x[1], str) else x[1]),
)


Expand Down

0 comments on commit efb8808

Please sign in to comment.