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"],