mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-25 14:50:24 +00:00
fix: 快捷命令账号选择未按账号数量排序
This commit is contained in:
@@ -304,6 +304,6 @@ class UsernameHintsAPI(APIView):
|
||||
.filter(username__icontains=query) \
|
||||
.filter(asset__in=assets) \
|
||||
.values('username') \
|
||||
.annotate(total=Count('username', distinct=True)) \
|
||||
.order_by('total', '-username')[:10]
|
||||
.annotate(total=Count('username')) \
|
||||
.order_by('-total', '-username')[:10]
|
||||
return Response(data=top_accounts)
|
||||
|
Reference in New Issue
Block a user