mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Merge branch 'bugfix/404-startup' into 'dev'
Fix exception related to page data on server start See merge request crafty-controller/crafty-4!544
This commit is contained in:
commit
77d3421778
@ -3,7 +3,7 @@
|
||||
### New features
|
||||
TBD
|
||||
### Bug fixes
|
||||
TBD
|
||||
- Fix exception related to page data on server start ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/544))
|
||||
### Tweaks
|
||||
TBD
|
||||
### Lang
|
||||
|
@ -183,6 +183,7 @@ class ServerHandler(BaseHandler):
|
||||
"version_data": "version_data_here", # TODO
|
||||
"user_data": exec_user,
|
||||
"show_contribute": self.helper.get_setting("show_contribute_link", True),
|
||||
"background": self.controller.cached_login,
|
||||
"lang": self.controller.users.get_user_lang_by_id(exec_user["user_id"]),
|
||||
"lang_page": Helpers.get_lang_page(
|
||||
self.controller.users.get_user_lang_by_id(exec_user["user_id"])
|
||||
|
@ -7,12 +7,12 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
class StatusHandler(BaseHandler):
|
||||
def get(self):
|
||||
page_data = {"background": self.controller.cached_login}
|
||||
page_data["lang"] = self.helper.get_setting("language")
|
||||
page_data["lang_page"] = self.helper.get_lang_page(
|
||||
self.helper.get_setting("language")
|
||||
)
|
||||
page_data["servers"] = self.controller.servers.get_all_servers_stats()
|
||||
page_data = {
|
||||
"background": self.controller.cached_login,
|
||||
"lang": self.helper.get_setting("language"),
|
||||
"lang_page": self.helper.get_lang_page(self.helper.get_setting("language")),
|
||||
"servers": self.controller.servers.get_all_servers_stats(),
|
||||
}
|
||||
running = 0
|
||||
for srv in page_data["servers"]:
|
||||
if srv["stats"]["running"]:
|
||||
|
Loading…
Reference in New Issue
Block a user