From c0e4b8a1b939aaa91d0c71f195ba0d1afbb93e53 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Tue, 11 Jul 2023 14:21:36 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=AF=94=E4=BE=8B=E5=90=88=E8=AE=A1?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/enm/serializers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/enm/serializers.py b/apps/enm/serializers.py index 4102a563..6111631c 100644 --- a/apps/enm/serializers.py +++ b/apps/enm/serializers.py @@ -32,7 +32,8 @@ class MpointSerializer(CustomModelSerializer): if i['mgroup'] in mgroupIds: raise ParseError('分配集错误') mgroupIds.append(i['mgroup']) - if ratio_ != 1: + print(ratio_, round(ratio_, 2)) + if round(ratio_, 3) != 1.0: raise ParseError('比例合计错误') return attrs