mirror of https://github.com/jumpserver/jumpserver
fix: 快捷命令账号选择未按账号数量排序
parent
59f9a4f369
commit
d4c8425218
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue