From 0775e28e568208839ee3f472c37e01a70fb6bd8a Mon Sep 17 00:00:00 2001 From: Andrew Date: Fri, 4 Mar 2022 17:30:17 -0500 Subject: [PATCH] Fix error thrown when no icon is available --- app/classes/web/status_handler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/classes/web/status_handler.py b/app/classes/web/status_handler.py index 87ba7275..ebd5ab4a 100644 --- a/app/classes/web/status_handler.py +++ b/app/classes/web/status_handler.py @@ -14,6 +14,8 @@ class StatusHandler(BaseHandler): server_data = srv.get('server_data', False) server_id = server_data.get('server_id', False) srv['raw_ping_result'] = self.controller.servers.get_server_stats_by_id(server_id) + if 'icon' not in srv['raw_ping_result']: + srv['raw_ping_result']['icon'] = False template = 'public/status.html' @@ -29,8 +31,6 @@ class StatusHandler(BaseHandler): server_data = srv.get('server_data', False) server_id = server_data.get('server_id', False) srv['raw_ping_result'] = self.controller.servers.get_server_stats_by_id(server_id) - if not srv['raw_ping_result'].has_key('icon'): - srv['raw_ping_result']['icon'] = False template = 'public/status.html' self.render(