From 8f5d280e31115d6bc34110d823ce6353547e874f Mon Sep 17 00:00:00 2001 From: Eric Date: Tue, 21 Feb 2023 22:25:50 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9C=AA=E6=BF=80=E6=B4=BB=E7=9A=84?= =?UTF-8?q?=E5=8F=91=E5=B8=83=E6=9C=BA=EF=BC=8C=E5=B0=86=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/terminal/models/applet/applet.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/terminal/models/applet/applet.py b/apps/terminal/models/applet/applet.py index c71fe95c2..ee83c8e52 100644 --- a/apps/terminal/models/applet/applet.py +++ b/apps/terminal/models/applet/applet.py @@ -111,7 +111,8 @@ class Applet(JMSBaseModel): return instance def select_host_account(self): - hosts = list(self.hosts.all()) + # 选择激活的发布机 + hosts = list(self.hosts.filter(is_active=True).all()) if not hosts: return None