From b067ec2ea73d7bd20e4801688f330d7318f45c2f Mon Sep 17 00:00:00 2001 From: caoqianming Date: Fri, 14 Mar 2025 09:57:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20handover=20validate=20handoverbw?= =?UTF-8?q?=E7=9A=84bug?= 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 e0fdafec..6884167a 100644 --- a/apps/wpm/serializers.py +++ b/apps/wpm/serializers.py @@ -955,7 +955,7 @@ class HandoverSerializer(CustomModelSerializer): for ind, item in enumerate(attrs['handoverb']): wm = item["wm"] if tracking == Material.MA_TRACKING_SINGLE: - handoverbw = item["handoverbw"] + handoverbw = item.get("handoverbw", []) if handoverbw: t_count += len(handoverbw) elif wm.count == item["count"]: