From 952497cd1973d8e06060d444d0b7372bd9f3cbaf Mon Sep 17 00:00:00 2001 From: "user@node5.net" Date: Thu, 18 Jun 2026 19:06:58 +0200 Subject: fix: password of the month, pick latest if no data in the last month --- src/db_handler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/db_handler.py b/src/db_handler.py index e97c8ce..e6452f3 100644 --- a/src/db_handler.py +++ b/src/db_handler.py @@ -51,7 +51,7 @@ class DBHandler: cur.execute(""" SELECT password FROM login_attempt - WHERE timestamp BETWEEN current_timestamp - interval '1 month' AND timestamp + WHERE timestamp BETWEEN (SELECT timestamp FROM login_attempt ORDER BY timestamp DESC LIMIT 1) - interval '1 month' AND timestamp GROUP BY password ORDER BY COUNT(password) DESC LIMIT 1; -- cgit v1.3.1