mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-27 22:05:19 +00:00
fix(subcontracting): guard empty raw-material list before strict zip
`update_inward_order_received_items_for_manufacture` unpacks `zip(*item_code_wh.keys(), strict=True)`. When the manufacture entry has no raw-material rows (all rows are finished/secondary/scrap), `item_code_wh` is empty and the unpack raises `ValueError: not enough values to unpack`. Return early when there are no such rows, mirroring the `if secondary_items:` guard already present in `update_inward_order_secondary_items`.
This commit is contained in:
@@ -793,6 +793,9 @@ class SubcontractingInwardController:
|
|||||||
for item in self.items
|
for item in self.items
|
||||||
if not item.is_finished_item and not item.secondary_item_type and not item.is_legacy_scrap_item
|
if not item.is_finished_item and not item.secondary_item_type and not item.is_legacy_scrap_item
|
||||||
]
|
]
|
||||||
|
if not items:
|
||||||
|
return
|
||||||
|
|
||||||
item_code_wh = frappe._dict(
|
item_code_wh = frappe._dict(
|
||||||
{
|
{
|
||||||
(
|
(
|
||||||
|
|||||||
Reference in New Issue
Block a user