From 7fb75f04824320a81a601bc25ebe80886d94115c Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Mon, 7 Apr 2025 11:06:19 +0530 Subject: [PATCH] fix: use get instead of dot operator to access dict value --- erpnext/controllers/stock_controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/stock_controller.py b/erpnext/controllers/stock_controller.py index 89bfaf9e4c6..e76fa657cab 100644 --- a/erpnext/controllers/stock_controller.py +++ b/erpnext/controllers/stock_controller.py @@ -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}