]> git.mxchange.org Git - fba.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Tue, 23 May 2023 11:56:05 +0000 (13:56 +0200)
committerRoland Häder <roland@mxchange.org>
Tue, 23 May 2023 11:56:05 +0000 (13:56 +0200)
- if the software being used isn't regonized, skip them

api.py

diff --git a/api.py b/api.py
index 0174a8d8b06b8a85300ef261ee5260b7db453653..131ea389be623e313510e02263de770cd825b8d0 100644 (file)
--- 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 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 LIMIT ?", [software])
     else:
         raise HTTPException(status_code=400, detail="No filter specified")