fix: 修复应用账号中没有应用却有账号的问题

pull/6645/head
ibuler 3 years ago committed by 老广
parent a5419b49ee
commit bee4e05b5f

@ -35,7 +35,8 @@ class ApplicationAccountViewSet(JMSModelViewSet):
http_method_names = ['get', 'put', 'patch', 'options'] http_method_names = ['get', 'put', 'patch', 'options']
def get_queryset(self): def get_queryset(self):
queryset = ApplicationPermission.objects.all() \ queryset = ApplicationPermission.objects.exclude(system_users__isnull=True) \
.exclude(applications__isnull=True) \
.annotate(uid=Concat( .annotate(uid=Concat(
'applications', Value('_'), 'system_users', output_field=CharField() 'applications', Value('_'), 'system_users', output_field=CharField()
)) \ )) \

Loading…
Cancel
Save