fix: use get instead of dot operator to access dict value

(cherry picked from commit 7fb75f0482)
This commit is contained in:
Mihir Kandoi
2025-04-07 11:06:19 +05:30
committed by Mergify
parent c47b3c3642
commit f2df8e531d

View File

@@ -774,7 +774,7 @@ class StockController(AccountsController):
if row.get("batch_no"):
update_values["batch_no"] = None
if row.serial_and_batch_bundle:
if row.get("serial_and_batch_bundle"):
update_values["serial_and_batch_bundle"] = None
frappe.db.set_value(
"Serial and Batch Bundle", row.serial_and_batch_bundle, {"is_cancelled": 1}