From 64f8de54f1799bd7695cda99909cc6c45c0421e9 Mon Sep 17 00:00:00 2001 From: Egor Matveev Date: Wed, 5 Apr 2023 15:58:27 +0000 Subject: [PATCH] Update notify.py bugfix --- daemons/notify.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemons/notify.py b/daemons/notify.py index 78c4e79..8bd4d05 100644 --- a/daemons/notify.py +++ b/daemons/notify.py @@ -59,7 +59,7 @@ def process(): {"$set": {"next_daily_notify_time": user_model.next_daily_notify_time + datetime.timedelta(days=1)}} ) - for user in mongo.users_collection.find({"first_lesson_notify": True, "hse_id": {"$ne": None}}): + for user in mongo.users_collection.find({"first_lesson_notify": {"$exists": True}, "first_lesson_notify": {"$ne": None}, "hse_id": {"$ne": None}}): time_now = now(UserSchema().load(user)) for lesson in mongo.lessons_collection.find({ "hse_user_id": user["hse_id"],