Skip to content

Commit

Permalink
fix: reload task before save
Browse files Browse the repository at this point in the history
  • Loading branch information
s-aga-r committed Sep 11, 2023
1 parent d3295c4 commit 5cae2e7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions erpnext/projects/doctype/project/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ def check_depends_on_value(self, template_task, project_task, project_tasks):
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()

Expand Down

0 comments on commit 5cae2e7

Please sign in to comment.