Skip to content
Snippets Groups Projects
Commit 7e7a2855 authored by Administrator's avatar Administrator
Browse files

Handle protocol.done == None correctly when sending reminders

parent fde416aa
Branches
No related tags found
No related merge requests found
...@@ -1328,7 +1328,7 @@ def check_and_send_reminders(): ...@@ -1328,7 +1328,7 @@ def check_and_send_reminders():
current_time = datetime.now() current_time = datetime.now()
current_day = current_time.date() current_day = current_time.date()
print("regular action for reminders") print("regular action for reminders")
for protocol in Protocol.query.filter(Protocol.done == False).all(): for protocol in Protocol.query.filter(Protocol.done != True).all():
day_difference = (protocol.date - current_day).days day_difference = (protocol.date - current_day).days
usual_time = protocol.protocoltype.usual_time usual_time = protocol.protocoltype.usual_time
protocol_time = datetime(1, 1, 1, usual_time.hour, usual_time.minute) protocol_time = datetime(1, 1, 1, usual_time.hour, usual_time.minute)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment