mirror of https://github.com/jumpserver/jumpserver
fix: 修复 applet 账号选择问题
parent
6eb9986c75
commit
c4b25fbdbd
|
@ -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') \
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue