mirror of https://git.48k.eu/ogcp
views: prevent backtrace when no server is available
Define the timestamp in the codepath executed when no server is found active. Prevent the web to show a backtrace because the timestamp variable is used but not defined as it is only created when a server is found.master
parent
9cb3a952b4
commit
1f18af1208
|
@ -420,6 +420,7 @@ def index():
|
|||
time_dict = {'now': now, 'boot': boot, 'start': start}
|
||||
dashboard_servers[server_id]['time_dict'] = time_dict
|
||||
else:
|
||||
timestamp = datetime.datetime.today()
|
||||
dashboard_servers[server.id] = {}
|
||||
dashboard_servers[server.id]['online'] = False
|
||||
dashboard_servers[server.id]['name'] = server.name
|
||||
|
|
Loading…
Reference in New Issue