refactor(subcontracting): hoist ValueWrapper import to module level

`validate_delivery_on_save` imported `pypika.terms.ValueWrapper` inside its
per-item loop, re-running the import on every iteration. Move it to the
module-level imports.
This commit is contained in:
Mihir Kandoi
2026-06-22 07:48:33 +05:30
parent 8fc7cb0117
commit 57f5186dff

View File

@@ -4,6 +4,7 @@ import frappe
from frappe import _, bold
from frappe.query_builder import Case
from frappe.utils import flt, get_link_to_form
from pypika.terms import ValueWrapper
from erpnext.stock.serial_batch_bundle import get_serial_batch_list_from_item
@@ -500,8 +501,6 @@ class SubcontractingInwardController:
)
)
from pypika.terms import ValueWrapper
table = frappe.qb.DocType("Subcontracting Inward Order Item")
query = (
frappe.qb.from_(table)