Skip to content
Snippets Groups Projects
Commit 069562f1 authored by Administrator's avatar Administrator
Browse files

Send mails correctly

parent 51ecbdd1
Branches
No related tags found
No related merge requests found
...@@ -479,8 +479,9 @@ def send_todomails_async(protocol_id): ...@@ -479,8 +479,9 @@ def send_todomails_async(protocol_id):
with app.app_context(): with app.app_context():
protocol = Protocol.query.filter_by(id=protocol_id).first() protocol = Protocol.query.filter_by(id=protocol_id).first()
all_todos = [ all_todos = [
todo for todo in Todo.query.filter.all() todo for todo in Todo.query.all()
if not todo.is_done() if not todo.is_done()
and todo.protocoltype == protocol.protocoltype
] ]
users = {user for todo in all_todos for user in todo.get_users()} users = {user for todo in all_todos for user in todo.get_users()}
grouped_todos = { grouped_todos = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment