Skip to content
Snippets Groups Projects
Commit 8095b998 authored by Robin Sonnabend's avatar Robin Sonnabend
Browse files

Do not update todos on recompiling old protocols

parent 7021e5e0
No related branches found
No related tags found
No related merge requests found
......@@ -301,6 +301,12 @@ def parse_protocol_async_inner(protocol, encoded_kwargs):
db.session.add(todo)
db.session.commit()
todo.protocols.append(protocol)
is_newest_protocol = True
for other_protocol in todo.protocols:
if other_protocol.date > protocol.date:
is_newest_protocol = False
break
if is_newest_protocol:
todo.state = field_state
todo.date = field_date
todo.who = who
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment