diff --git a/CHANGELOG.md b/CHANGELOG.md index 924018e8..b0c03e23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,8 @@ ### New features TBD ### Bug fixes -- Fix migrator issues when jumping versions ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/734)) +- Fix migrator issue when jumping versions ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/734)) +- Fix backend issue causing error when restoring backups in 4.3.x ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/736)) ### Tweaks - Clean up remaining http handler references ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/733)) - Remove version disclosure on login page ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/737)) diff --git a/app/classes/controllers/server_perms_controller.py b/app/classes/controllers/server_perms_controller.py index f6632cd7..37893e9e 100644 --- a/app/classes/controllers/server_perms_controller.py +++ b/app/classes/controllers/server_perms_controller.py @@ -47,7 +47,7 @@ class ServerPermsController: new_server_id, role.role_id, PermissionsServers.get_permissions_mask( - int(role.role_id), int(old_server_id) + int(role.role_id), old_server_id ), ) # Permissions_Servers.add_role_server( diff --git a/app/classes/shared/main_controller.py b/app/classes/shared/main_controller.py index b6e824a5..938ff748 100644 --- a/app/classes/shared/main_controller.py +++ b/app/classes/shared/main_controller.py @@ -1131,7 +1131,7 @@ class Controller: server_obj.path = new_local_server_path failed = False for s in self.servers.failed_servers: - if int(s["server_id"]) == int(server.get("server_id")): + if s["server_id"] == server.get("server_id"): failed = True if not failed: self.servers.update_server(server_obj) diff --git a/app/classes/web/routes/api/servers/server/backups/backup/index.py b/app/classes/web/routes/api/servers/server/backups/backup/index.py index 05edd3a9..70ceb2b2 100644 --- a/app/classes/web/routes/api/servers/server/backups/backup/index.py +++ b/app/classes/web/routes/api/servers/server/backups/backup/index.py @@ -203,7 +203,7 @@ class ApiServersServerBackupsBackupIndexHandler(BaseApiHandler): except JobLookupError as e: logger.info("No active tasks found for server: {e}") self.controller.remove_server(server_id, True) - except Exception as e: + except (FileNotFoundError, NotADirectoryError) as e: return self.finish_json( 400, {"status": "error", "error": f"NO BACKUP FOUND {e}"} )