fix: MlogbInSerializer bug

This commit is contained in:
caoqianming 2024-07-17 17:08:42 +08:00
parent c058fe9338
commit ee65658145
2 changed files with 1 additions and 2 deletions

View File

@ -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():

View File

@ -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