refactor(subcontracting): drop redundant scio_item_name check

In `update_inward_order_item`, the walrus assignment `scio_item_name :=` is
already part of the truthy `if` condition, so the nested `if scio_item_name:`
is always true. Remove it and dedent the body.
This commit is contained in:
Mihir Kandoi
2026-06-22 07:48:46 +05:30
parent 57f5186dff
commit a342db38de

View File

@@ -645,10 +645,9 @@ class SubcontractingInwardController:
"Work Order", self.work_order, "subcontracting_inward_order_item"
)
):
if scio_item_name:
frappe.get_doc(
"Subcontracting Inward Order Item", scio_item_name
).update_manufacturing_qty_fields()
frappe.get_doc(
"Subcontracting Inward Order Item", scio_item_name
).update_manufacturing_qty_fields()
elif self.purpose in ["Subcontracting Delivery", "Subcontracting Return"]:
fieldname = "delivered_qty" if self.purpose == "Subcontracting Delivery" else "returned_qty"
qty_map = defaultdict(lambda: defaultdict(float))