From 205bbf356f0b5a1b9b27eba023b0cab3cee81afb Mon Sep 17 00:00:00 2001 From: amcmanu3 Date: Tue, 21 Jun 2022 18:40:16 -0400 Subject: [PATCH 1/2] Fix traceback on server schedule creation page --- app/classes/web/panel_handler.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app/classes/web/panel_handler.py b/app/classes/web/panel_handler.py index 4b4075a6..5122a683 100644 --- a/app/classes/web/panel_handler.py +++ b/app/classes/web/panel_handler.py @@ -868,6 +868,11 @@ class PanelHandler(BaseHandler): elif page == "add_schedule": server_id = self.get_argument("id", None) + if server_id is None: + return self.redirect("/panel/error?error=Invalid Schedule ID") + server_obj = self.controller.servers.get_server_instance_by_id(server_id) + page_data["backup_failed"] = server_obj.last_backup_status() + server_obj = None page_data["schedules"] = HelpersManagement.get_schedules_by_server( server_id ) @@ -926,7 +931,10 @@ class PanelHandler(BaseHandler): elif page == "edit_schedule": server_id = self.check_server_id() if not server_id: - return + return self.redirect("/panel/error?error=Invalid Schedule ID") + server_obj = self.controller.servers.get_server_instance_by_id(server_id) + page_data["backup_failed"] = server_obj.last_backup_status() + server_obj = None page_data["schedules"] = HelpersManagement.get_schedules_by_server( server_id @@ -934,6 +942,7 @@ class PanelHandler(BaseHandler): sch_id = self.get_argument("sch_id", None) if sch_id is None: self.redirect("/panel/error?error=Invalid Schedule ID") + return schedule = self.controller.management.get_scheduled_task_model(sch_id) page_data[ "get_players" From f2023ec06a9a1eba15a672e780bf103b72a1b35b Mon Sep 17 00:00:00 2001 From: Zedifus Date: Tue, 21 Jun 2022 23:43:10 +0100 Subject: [PATCH 2/2] Update changelog !381 --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa055a77..0aafa844 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## --- [4.0.4-hotfix2] - 2022/06/21 +### Bug fixes +- Fix Traceback on schedule config page ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/381)) +

+ ## --- [4.0.4-hotfix] - 2022/06/21 ### Bug fixes - Remove bad check for backups path ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/380))