Merge pull request #50500 from frappe/mergify/bp/version-15/pr-50488

fix: handle NoneType object error for packed_items (backport #50488)
This commit is contained in:
rohitwaghchaure
2025-11-12 23:54:34 +05:30
committed by GitHub

View File

@@ -1390,13 +1390,15 @@ class SerialandBatchBundle(Document):
so_name, so_detail_no = frappe.db.get_value(
"Delivery Note Item", self.voucher_detail_no, ["against_sales_order", "so_detail"]
)
) or [None, None]
if so_name and so_detail_no:
sre_names = get_sre_against_so_for_dn(so_name, so_detail_no)
return sre_names
return None
@frappe.whitelist()
def download_blank_csv_template(content):