From 0368e69119dc8660b25e76f11a6c281fe20cd1b0 Mon Sep 17 00:00:00 2001 From: emmatveev Date: Mon, 19 Feb 2024 20:08:10 +0300 Subject: [PATCH] fix2 --- api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api.py b/api.py index 6cfee7f..4b70f59 100644 --- a/api.py +++ b/api.py @@ -21,7 +21,7 @@ def stats_json(): @app.route('/rating', methods=['GET']) def main(): rating = defaultdict(int) - for doc in mongo.counter_collection.find({}): + for doc in mongo.counter_collection.find({"username": {"$ne": None}}): rating[doc["username"]] += doc['count'] rating_list = [] for user, count in rating.items():