fix: 'NoneType' object has no attribute 'get' in get_item_details.py (#49381)

This commit is contained in:
Diógenes Souza
2025-09-17 09:35:49 -03:00
committed by GitHub
parent 244dce5098
commit c4f90c3b34

View File

@@ -202,7 +202,7 @@ def update_stock(ctx, out, doc=None):
"item_code": ctx.item_code,
"warehouse": ctx.warehouse,
"based_on": frappe.get_single_value("Stock Settings", "pick_serial_and_batch_based_on"),
"sabb_voucher_no": doc.get("name"),
"sabb_voucher_no": doc.get("name") if doc else None,
"sabb_voucher_detail_no": ctx.child_docname,
"sabb_voucher_type": ctx.doctype,
}