Browse Source

fix: 【用户管理】-创建用户组-可将系统审计员加入到用户组 #579

pull/5289/head
xinwen 4 years ago committed by Jiangjie.Bai
parent
commit
c3e2e536e0
  1. 4
      apps/users/serializers/group.py

4
apps/users/serializers/group.py

@ -53,3 +53,7 @@ class UserGroupSerializer(BulkOrgResourceModelSerializer):
Prefetch('users', queryset=User.objects.only('id'))
).annotate(users_amount=Count('users'))
return queryset
def validate_users(self, users):
users = [user for user in users if user.role != User.ROLE.AUDITOR]
return users

Loading…
Cancel
Save