From ee656581458929e39e7001c7330df6b561ef338b Mon Sep 17 00:00:00 2001 From: caoqianming Date: Wed, 17 Jul 2024 17:08:42 +0800 Subject: [PATCH] fix: MlogbInSerializer bug --- apps/wpm/serializers.py | 2 +- apps/wpm/services.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/wpm/serializers.py b/apps/wpm/serializers.py index ef1fb11d..8c28541e 100644 --- a/apps/wpm/serializers.py +++ b/apps/wpm/serializers.py @@ -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(): diff --git a/apps/wpm/services.py b/apps/wpm/services.py index cbb4eb00..f645a175 100644 --- a/apps/wpm/services.py +++ b/apps/wpm/services.py @@ -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