From bee4e05b5fae10908703c3c1abff18e78d707cac Mon Sep 17 00:00:00 2001 From: ibuler Date: Mon, 16 Aug 2021 11:20:50 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=BA=94=E7=94=A8?= =?UTF-8?q?=E8=B4=A6=E5=8F=B7=E4=B8=AD=E6=B2=A1=E6=9C=89=E5=BA=94=E7=94=A8?= =?UTF-8?q?=E5=8D=B4=E6=9C=89=E8=B4=A6=E5=8F=B7=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/applications/api/account.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/applications/api/account.py b/apps/applications/api/account.py index 1874b2bab..8071125b2 100644 --- a/apps/applications/api/account.py +++ b/apps/applications/api/account.py @@ -35,7 +35,8 @@ class ApplicationAccountViewSet(JMSModelViewSet): http_method_names = ['get', 'put', 'patch', 'options'] def get_queryset(self): - queryset = ApplicationPermission.objects.all() \ + queryset = ApplicationPermission.objects.exclude(system_users__isnull=True) \ + .exclude(applications__isnull=True) \ .annotate(uid=Concat( 'applications', Value('_'), 'system_users', output_field=CharField() )) \