Skip to content

Commit

Permalink
fix: don't access db unnecessarily
Browse files Browse the repository at this point in the history
  • Loading branch information
blaggacao committed Sep 19, 2024
1 parent 1807ca8 commit 40c3cea
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion hrms/overrides/employee_payment_entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ def set_missing_ref_details(
continue

if field == "exchange_rate" or not d.get(field) or force:
d.db_set(field, value)
if self.get("_action") in ("submit", "cancel"):
d.db_set(field, value)
else:
d.set(field, value)


@frappe.whitelist()
Expand Down

0 comments on commit 40c3cea

Please sign in to comment.