fix: 修复 applet 账号选择问题

pull/10517/head
ibuler 2023-05-19 15:06:23 +08:00 committed by Jiangjie.Bai
parent 6eb9986c75
commit c4b25fbdbd
2 changed files with 2 additions and 1 deletions

View File

@ -166,6 +166,7 @@ class UsernameHintsAPI(APIView):
top_accounts = Account.objects \
.exclude(username__startswith='jms_') \
.exclude(username__startswith='js_') \
.filter(username__icontains=query) \
.filter(asset__in=assets) \
.values('username') \

View File

@ -193,7 +193,7 @@ class Applet(JMSBaseModel):
if private_account and private_account.username not in accounts_username_used:
account = private_account
else:
accounts = accounts.exclude(username__in=accounts_username_used)
accounts = accounts.exclude(username__in=accounts_username_used).filter(username__startswith='jms_')
account = self.random_select_prefer_account(user, host, accounts)
if not account:
return