fix: mlogbinserializer处理返工的错误

This commit is contained in:
caoqianming 2025-02-24 16:06:55 +08:00
parent 2663f20953
commit 2941ebd7d6
1 changed files with 1 additions and 1 deletions

View File

@ -562,7 +562,7 @@ class MlogbInSerializer(CustomModelSerializer):
attrs['batch'] = wm_in.batch attrs['batch'] = wm_in.batch
attrs["batch_ofrom"] = wm_in.batch_ofrom attrs["batch_ofrom"] = wm_in.batch_ofrom
attrs["material_ofrom"] = wm_in.material_ofrom attrs["material_ofrom"] = wm_in.material_ofrom
if route.batch_bind and mtask is not None: if route and route.batch_bind and mtask is not None:
if not WMaterial.mat_in_qs(mtask).filter(id=wm_in.id).exists(): if not WMaterial.mat_in_qs(mtask).filter(id=wm_in.id).exists():
raise ParseError('该车间库存非本任务使用') raise ParseError('该车间库存非本任务使用')
return attrs return attrs