Merge pull request #46945 from frappe/mergify/bp/version-15-hotfix/pr-46892

fix: use get instead of dot operator to access dict value to prevent no attribute error (backport #46892)
This commit is contained in:
ruthra kumar
2025-04-08 17:20:45 +05:30
committed by GitHub

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}