mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Reliable sort order for facets in Python 3.5, fixing test - refs #255
This commit is contained in:
parent
062303419c
commit
b263da78e3
3 changed files with 4 additions and 4 deletions
|
|
@ -716,7 +716,7 @@ class TableView(RowTableShared):
|
|||
"display_rows": display_rows,
|
||||
"sorted_facet_results": sorted(
|
||||
facet_results.values(),
|
||||
key=lambda f: len(f["results"]),
|
||||
key=lambda f: (len(f["results"]), f["name"]),
|
||||
reverse=True
|
||||
),
|
||||
"is_sortable": any(c["sortable"] for c in display_columns),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue