fix: Qty and UOM not fetched when adding Item in Material Request (#58118)

This commit is contained in:
Henil Maru
2026-08-13 14:46:05 +05:30
committed by GitHub
parent e51df54439
commit aecc551b5e

View File

@@ -177,7 +177,12 @@ def normalize_ctx_input(T: type) -> callable:
def decorator(func: callable):
# conserve annotations for frappe.utils.typing_validations
@functools.wraps(func, assigned=(a for a in functools.WRAPPER_ASSIGNMENTS if a != "__annotations__"))
@functools.wraps(
func,
assigned=(
a for a in functools.WRAPPER_ASSIGNMENTS if a not in ("__annotations__", "__annotate__")
),
)
def wrapper(ctx: T | Document | dict | str, *args, **kwargs):
if isinstance(ctx, Document):
ctx = T(**ctx.as_dict())