From a30c603bdcc8bb3f2e970cb600b162e9ceaa9ecb Mon Sep 17 00:00:00 2001 From: Bai Date: Wed, 8 Jul 2020 15:17:07 +0800 Subject: [PATCH] =?UTF-8?q?fix(user=5Fgroup):=20=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E7=BB=84=E4=B8=AD=E6=B7=BB=E5=8A=A0=E7=94=A8=E6=88=B7=EF=BC=8C?= =?UTF-8?q?=E5=8F=96=E6=B6=88=E5=AE=A1=E8=AE=A1=E5=91=98=E7=9A=84=E9=99=90?= =?UTF-8?q?=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/users/serializers/group.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/apps/users/serializers/group.py b/apps/users/serializers/group.py index a6b9f67b9..24805d0f4 100644 --- a/apps/users/serializers/group.py +++ b/apps/users/serializers/group.py @@ -42,14 +42,7 @@ class UserGroupSerializer(BulkOrgResourceModelSerializer): def set_fields_queryset(self): users_field = self.fields.get('users') if users_field: - users_field.child_relation.queryset = utils.get_current_org_members(exclude=('Auditor',)) - - def validate_users(self, users): - for user in users: - if user.is_super_auditor: - msg = _('Auditors cannot be join in the user group') - raise serializers.ValidationError(msg) - return users + users_field.child_relation.queryset = utils.get_current_org_members() @classmethod def setup_eager_loading(cls, queryset):