fix: 快捷命令账号选择未按账号数量排序

pull/13092/head
wangruidong 2024-04-19 17:02:50 +08:00 committed by 老广
parent 59f9a4f369
commit d4c8425218
1 changed files with 2 additions and 2 deletions

View File

@ -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)