Browse Source

fix: Fixed the issue that the workbench user login log only displays failed logs

pull/14249/head
Bai 2 months ago committed by Eric_Lee
parent
commit
ad6d2e1cd7
  1. 4
      apps/audits/api.py

4
apps/audits/api.py

@ -146,7 +146,9 @@ class MyLoginLogViewSet(UserLoginCommonMixin, OrgReadonlyModelViewSet):
def get_queryset(self): def get_queryset(self):
qs = super().get_queryset() qs = super().get_queryset()
qs = qs.filter(username=self.request.user.username) username = self.request.user.username
q = Q(username=username) | Q(username__icontains=f'({username})')
qs = qs.filter(q)
return qs return qs

Loading…
Cancel
Save