fix: MlogbInSerializer bug
This commit is contained in:
parent
c058fe9338
commit
ee65658145
|
@ -371,7 +371,7 @@ class MlogbInSerializer(CustomModelSerializer):
|
|||
if mlog.route != mtask.route:
|
||||
raise ValidationError('工序不匹配')
|
||||
route = mlog.route
|
||||
attrs['material_in'] = wm_in.material_in
|
||||
attrs['material_in'] = wm_in.material
|
||||
attrs['batch'] = wm_in.batch
|
||||
if route.batch_bind:
|
||||
if not Mlogb.objects.filter(mtask__utask=mtask.utask, mlog__submit_time__isnull=False, material_out__isnull=False, batch=attrs['batch']).exists():
|
||||
|
|
|
@ -457,7 +457,6 @@ def handover_submit(handover: Handover, user: User, now: Union[datetime.datetime
|
|||
return
|
||||
now = timezone.now()
|
||||
need_add = True
|
||||
wm_from_need_delete = False
|
||||
material = handover.material
|
||||
batch = handover.batch
|
||||
wm_from = handover.wm
|
||||
|
|
Loading…
Reference in New Issue