Skip to content

Commit

Permalink
fix: Avoid concurrent TODO updates (#26593)
Browse files Browse the repository at this point in the history
(cherry picked from commit e43205e)

Co-authored-by: Ankush Menat <ankush@frappe.io>
  • Loading branch information
mergify[bot] and ankush committed May 30, 2024
1 parent a45237d commit df821ee
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions frappe/desk/doctype/todo/todo.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,17 @@ def update_in_reference(self):
return

try:
assignments = frappe.get_all(
assignments = frappe.db.get_values(
"ToDo",
filters={
{
"reference_type": self.reference_type,
"reference_name": self.reference_name,
"status": ("not in", ("Cancelled", "Closed")),
"allocated_to": ("is", "set"),
},
pluck="allocated_to",
"allocated_to",
pluck=True,
for_update=True,
)
assignments.reverse()

Expand Down

0 comments on commit df821ee

Please sign in to comment.