fix: reload task before save

This commit is contained in:
s-aga-r 2023-09-08 20:36:27 +05:30
parent d3295c43e3
commit 5cae2e79bd

View File

@ -125,6 +125,7 @@ class Project(Document):
filter(lambda x: x.subject == child_task_subject, project_tasks)
)
if len(corresponding_project_task):
project_task.reload() # reload, as it might have been updated in the previous iteration
project_task.append("depends_on", {"task": corresponding_project_task[0].name})
project_task.save()