fix: mpointserializer validate 错误
This commit is contained in:
parent
866ad4d15d
commit
039876349e
|
@ -34,7 +34,7 @@ class MpointSerializer(CustomModelSerializer):
|
|||
raise ParseError('分配集错误')
|
||||
mgroupIds.append(i['mgroup'])
|
||||
i['mgroup_name'] = Mgroup.objects.get(id=i['mgroup']).name
|
||||
if round(ratio_, 3) != 1.0:
|
||||
if attrs['mgroups_allocate'] and round(ratio_, 3) != 1.0:
|
||||
raise ParseError('比例合计错误')
|
||||
return attrs
|
||||
|
||||
|
|
Loading…
Reference in New Issue