From 0156c6b5e52d541e93f0d68e9245f20ae83bc933 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Mon, 15 Nov 2021 17:31:33 -0800 Subject: [PATCH] Facet in predictable order for tests, refs #448 --- datasette/facets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datasette/facets.py b/datasette/facets.py index ce2111c95f..62e7775ea7 100644 --- a/datasette/facets.py +++ b/datasette/facets.py @@ -373,7 +373,7 @@ async def facet_results(self): group by value order by - count(*) desc limit {limit} + count(*) desc, value limit {limit} """.format( col=escape_sqlite(column), sql=self.sql, limit=facet_size + 1 )