From 2a23af503097707697e196d4a101303d6a0ce666 Mon Sep 17 00:00:00 2001 From: ibuler Date: Tue, 5 Dec 2023 11:39:19 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=20applet=20=E8=B4=A6?= =?UTF-8?q?=E5=8F=B7=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/terminal/models/applet/applet.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/terminal/models/applet/applet.py b/apps/terminal/models/applet/applet.py index 661078011..c018275ac 100644 --- a/apps/terminal/models/applet/applet.py +++ b/apps/terminal/models/applet/applet.py @@ -223,7 +223,9 @@ class Applet(JMSBaseModel): accounts = valid_accounts.exclude(username__in=accounts_username_used) public_accounts = accounts.filter(username__startswith='jms_') if not public_accounts: - public_accounts = accounts.exclude(username__in=['Administrator', 'root']) + public_accounts = accounts \ + .exclude(username__in=['Administrator', 'root']) \ + .exclude(username__startswith='js_') account = self.random_select_prefer_account(user, host, public_accounts) return account