From 84380931fd2f22e3537608f0e26b8e7f1bfe6249 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Thu, 24 Apr 2025 16:12:38 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=AE=8C=E5=96=84=E8=B4=9F=E6=95=B0?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C2?= 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 1ef04d96..bfa31f78 100644 --- a/apps/wpm/serializers.py +++ b/apps/wpm/serializers.py @@ -691,7 +691,7 @@ class MlogbInSerializer(CustomModelSerializer): 'wm_in': {'required': True, "allow_empty": False}} def validate(self, attrs): - if attrs["count_use"] < 0 or attrs.get("count_pn_jgqbl", 0) < 0 or attrs["count_break"] < 0: + if attrs["count_use"] < 0 or attrs.get("count_pn_jgqbl", 0) < 0 or attrs.get("count_break", 0) < 0: raise ParseError('存在负数!') mlog:Mlog = attrs['mlog'] is_fix = mlog.is_fix