From c791bde5be145549bade1e24ac4bbbbf67c488e6 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Mon, 14 Apr 2025 15:29:36 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20handover=E6=8B=86=E6=89=B9=E8=AF=B7?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E8=BD=A6=E9=97=B4=E5=BA=93=E5=AD=982?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wpm/serializers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/wpm/serializers.py b/apps/wpm/serializers.py index 7f6847f0..80b514f7 100644 --- a/apps/wpm/serializers.py +++ b/apps/wpm/serializers.py @@ -967,7 +967,7 @@ class HandoverSerializer(CustomModelSerializer): wm:WMaterial = attrs.get('wm', None) handoverb = attrs.get('handoverb', []) - if wm: + if wm and not handoverb: attrs['handoverb'] = [{"wm": wm, "count": attrs["count"] }] handoverb = attrs['handoverb'] attrs['batch'] = wm.batch