fix(users): 修复用户在不同组织引起的问题

This commit is contained in:
ibuler
2020-09-01 16:41:39 +08:00
committed by xinwen
parent 8227f44058
commit ddb71c43c4
3 changed files with 1 additions and 12 deletions

View File

@@ -44,9 +44,7 @@ class UserViewSet(CommonApiMixin, UserQuerysetMixin, BulkModelViewSet):
def get_queryset(self):
return super().get_queryset().annotate(
gc_m2m_org_members__role=GroupConcat('m2m_org_members__role'),
gc_groups__name=GroupConcat('groups__name'),
gc_groups=GroupConcat('groups__id', output_field=CharField())
)
).prefetch_related('groups')
def send_created_signal(self, users):
if not isinstance(users, list):