From 8897856aef5542a4f2960af4ccc14f3448c211cc Mon Sep 17 00:00:00 2001 From: amcmanu3 Date: Fri, 5 Aug 2022 20:24:42 -0400 Subject: [PATCH] Remove Update button when unloaded Fix duplicate list issue --- app/classes/controllers/servers_controller.py | 3 ++- app/frontend/templates/panel/server_config.html | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/classes/controllers/servers_controller.py b/app/classes/controllers/servers_controller.py index 6f0749b2..650a16b0 100644 --- a/app/classes/controllers/servers_controller.py +++ b/app/classes/controllers/servers_controller.py @@ -175,7 +175,8 @@ class ServersController(metaclass=Singleton): f"{server['server_name']} at path {server['path']}. " f"Skipping this server" ) - self.failed_servers.append(server) + if server not in self.failed_servers: + self.failed_servers.append(server) continue temp_server_dict = { diff --git a/app/frontend/templates/panel/server_config.html b/app/frontend/templates/panel/server_config.html index caf8f951..6c9a8b36 100644 --- a/app/frontend/templates/panel/server_config.html +++ b/app/frontend/templates/panel/server_config.html @@ -242,9 +242,11 @@ }}
{{ translate('serverConfig', 'stopBeforeDeleting', data['lang']) }} {% else %} + {% if not data['failed'] %} + {% end %} {% if not data['failed'] %}