From: Roland Häder Date: Wed, 24 May 2023 15:23:56 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=bf4dec2e3b1e444a1270804b554e4e41c9f2e45c;p=fba.git Continued: - after sorting by count, sort by software name --- 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")