From 4f5f9ded0f9730af233deedeb978812c9b7943fc Mon Sep 17 00:00:00 2001 From: Robin Sonnabend <robin@fsmpi.rwth-aachen.de> Date: Fri, 23 Mar 2018 19:45:23 +0100 Subject: [PATCH] Fix selecting protocol reminder candidates --- server.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server.py b/server.py index 4781f22..0c9f168 100755 --- a/server.py +++ b/server.py @@ -1825,7 +1825,8 @@ def check_and_send_reminders(): with app.app_context(): current_time = datetime.now() current_day = current_time.date() - for protocol in Protocol.query.filter(not Protocol.done).all(): + query = Protocol.query.filter(Protocol.done == False) # noqa: E712 + for protocol in query.all(): day_difference = (protocol.date - current_day).days usual_time = protocol.get_time() protocol_time = datetime( -- GitLab