From 5d1829b9988cf4551abe7a4cfcb87227d27ee559 Mon Sep 17 00:00:00 2001 From: Bai Date: Tue, 28 May 2024 10:57:43 +0800 Subject: [PATCH] fix: Disable the applet connection method when all applet hosts have is_active set to False --- apps/terminal/connect_methods.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/terminal/connect_methods.py b/apps/terminal/connect_methods.py index 9f40556da..a6b7e7e51 100644 --- a/apps/terminal/connect_methods.py +++ b/apps/terminal/connect_methods.py @@ -101,7 +101,7 @@ class AppletMethod: from .models import Applet, AppletHost methods = defaultdict(list) - has_applet_hosts = AppletHost.objects.all().exists() + has_applet_hosts = AppletHost.objects.filter(is_active=True).exists() applets = Applet.objects.filter(is_active=True) for applet in applets: for protocol in applet.protocols: