fix: mpointserializer validate 时不做mgroup绑定allocate处理

This commit is contained in:
caoqianming 2023-08-04 16:00:32 +08:00
parent 039876349e
commit 4157fd95a8
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@ class MpointSerializer(CustomModelSerializer):
attrs['cate'] = 'material'
if 'mgroup' in attrs and attrs['mgroup']:
attrs['belong_dept'] = attrs['mgroup'].belong_dept
attrs['mgroups_allocate'] = [{'mgroup': attrs['mgroup'].id, 'mgroup_name': attrs['mgroup'].name, 'ratio': 1}]
# attrs['mgroups_allocate'] = [{'mgroup': attrs['mgroup'].id, 'mgroup_name': attrs['mgroup'].name, 'ratio': 1}]
ratio_ = 0
mgroupIds = []
for i in attrs['mgroups_allocate']: