fix: Use set instead of db_set as it is called from validate (#34967)

fix: Use set instead of db_set as it is called from validate (#34967)

(cherry picked from commit 72b5c1f70a)

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
This commit is contained in:
mergify[bot]
2023-04-25 20:04:28 +05:30
committed by GitHub
parent 5923a80a0f
commit 665021270f

View File

@@ -60,7 +60,7 @@ class Opportunity(TransactionBase, CRMNote):
if not self.get(field) and frappe.db.field_exists(self.opportunity_from, field):
try:
value = frappe.db.get_value(self.opportunity_from, self.party_name, field)
self.db_set(field, value)
self.set(field, value)
except Exception:
continue