Skip to content

Commit

Permalink
perf: update values with one db query
Browse files Browse the repository at this point in the history
(cherry picked from commit 6a91ffd)
  • Loading branch information
vorasmit authored and mergify[bot] committed Aug 22, 2024
1 parent 7e139c3 commit eacec63
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@


def execute():
docs = frappe.get_all(
# Discard the action "Accept Supplier Values"
frappe.db.set_value(
"GST Inward Supply",
filters={"action": ["in", ["Accept My Values", "Accept Supplier Values"]]},
pluck="name",
{"action": ["in", ["Accept My Values", "Accept Supplier Values"]]},
"action",
"Accept",
)

for doc in docs:
frappe.db.set_value("GST Inward Supply", doc, "action", "Accept")

0 comments on commit eacec63

Please sign in to comment.