chore: `linter`
diff --git a/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.py b/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.py
index cc99085..33a2061 100644
--- a/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.py
+++ b/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.py
@@ -123,6 +123,8 @@
stock_bin.update_reserved_qty_for_sub_contracting()
def populate_items_table(self):
+ items = []
+
for si in self.service_items:
if si.fg_item:
item = frappe.get_doc("Item", si.fg_item)
@@ -132,8 +134,8 @@
)
or item.default_bom
)
- self.append(
- "items",
+
+ items.append(
{
"item_code": item.item_code,
"item_name": item.item_name,
@@ -143,7 +145,7 @@
"stock_uom": item.stock_uom,
"bom": bom,
"purchase_order_item": si.purchase_order_item,
- },
+ }
)
else:
frappe.throw(
@@ -152,6 +154,10 @@
)
)
+ if items:
+ for item in items:
+ self.append("items", item)
+
self.set_missing_values()
def update_status(self, status=None, update_modified=True):