remove 0-count elements from platform/browser ranking
This commit is contained in:
parent
180bae3a1b
commit
c6cc1e3a9e
@ -183,7 +183,9 @@ def _get_platform_or_browser_ranking(db: Database, timestamps: tuple[int, int],
|
|||||||
AND r.time BETWEEN {timestamps[0]} AND {timestamps[1]}
|
AND r.time BETWEEN {timestamps[0]} AND {timestamps[1]}
|
||||||
)
|
)
|
||||||
{'AND v.is_human = 1' if only_human else ''}""")
|
{'AND v.is_human = 1' if only_human else ''}""")
|
||||||
ranking.append((db.fetchone()[0], name))
|
count = db.fetchoone()[0]
|
||||||
|
if count > 0:
|
||||||
|
ranking.append((count, name))
|
||||||
ranking.sort()
|
ranking.sort()
|
||||||
return ranking
|
return ranking
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user