|
|
@ -216,9 +216,11 @@ class Applet(JMSBaseModel):
|
|
|
|
if private_account and private_account.username not in accounts_username_used:
|
|
|
|
if private_account and private_account.username not in accounts_username_used:
|
|
|
|
account = private_account
|
|
|
|
account = private_account
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
accounts = accounts.exclude(username__in=accounts_username_used) \
|
|
|
|
accounts = accounts.exclude(username__in=accounts_username_used)
|
|
|
|
.filter(username__startswith='jms_')
|
|
|
|
public_accounts = accounts.filter(username__startswith='jms_{}'.format(self.name))
|
|
|
|
account = self.random_select_prefer_account(user, host, accounts)
|
|
|
|
if not public_accounts:
|
|
|
|
|
|
|
|
public_accounts = accounts.exclude(username__in=['Administrator', 'root'])
|
|
|
|
|
|
|
|
account = self.random_select_prefer_account(user, host, public_accounts)
|
|
|
|
if not account:
|
|
|
|
if not account:
|
|
|
|
return
|
|
|
|
return
|
|
|
|
ttl = 60 * 60 * 24
|
|
|
|
ttl = 60 * 60 * 24
|
|
|
|