From bf4dec2e3b1e444a1270804b554e4e41c9f2e45c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 24 May 2023 17:23:56 +0200 Subject: [PATCH] Continued: - after sorting by count, sort by software name --- api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api.py b/api.py index d94d75e..790a080 100644 --- a/api.py +++ b/api.py @@ -42,7 +42,7 @@ def top(blocked: int = None, blockers: int = None, reference: int = None, softwa elif software != None: if software > 500: raise HTTPException(status_code=400, detail="Too many results") - fba.cursor.execute("SELECT software, COUNT(domain) FROM instances WHERE software IS NOT NULL GROUP BY software ORDER BY COUNT(domain) DESC LIMIT ?", [software]) + fba.cursor.execute("SELECT software, COUNT(domain) FROM instances WHERE software IS NOT NULL GROUP BY software ORDER BY COUNT(domain) DESC, software ASC LIMIT ?", [software]) else: raise HTTPException(status_code=400, detail="No filter specified") -- 2.39.5