From 02c098a6ee92a7ce9243b359488ba0d93322dc35 Mon Sep 17 00:00:00 2001 From: IgorVolochay Date: Tue, 25 Feb 2025 16:53:59 +0300 Subject: [PATCH] fix: fix check if a list is empty --- app/mongo_worker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/mongo_worker.py b/app/mongo_worker.py index 09a7ef4..41936ed 100644 --- a/app/mongo_worker.py +++ b/app/mongo_worker.py @@ -67,7 +67,7 @@ class MongoWorker: {"$sample": {"size": amount}}] raw_items = list(self.game_data.aggregate(pipeline)) - if raw_items: + if not raw_items: validated_items = [Card.model_validate(item) for item in raw_items] return validated_items else: