diff --git a/app/classes/controllers/management_controller.py b/app/classes/controllers/management_controller.py index 1cb99808..6efe492a 100644 --- a/app/classes/controllers/management_controller.py +++ b/app/classes/controllers/management_controller.py @@ -104,8 +104,8 @@ class Management_Controller: return management_helper.get_backup_config(server_id) @staticmethod - def set_backup_config(server_id: int, backup_path: str = None, max_backups: int = None): - return management_helper.set_backup_config(server_id, backup_path, max_backups) + def set_backup_config(server_id: int, backup_path: str = None, max_backups: int = None, excluded_dirs: list = None): + return management_helper.set_backup_config(server_id, backup_path, max_backups, excluded_dirs) @staticmethod def get_excluded_backup_dirs(server_id: int): diff --git a/app/classes/models/management.py b/app/classes/models/management.py index f57abe11..e197add6 100644 --- a/app/classes/models/management.py +++ b/app/classes/models/management.py @@ -339,6 +339,9 @@ class helpers_management: new_row = True if max_backups is not None: conf['max_backups'] = max_backups + if excluded_dirs is not None: + dirs_to_exclude = ",".join(excluded_dirs) + conf['excluded_dirs'] = dirs_to_exclude if not new_row: with database.atomic(): if backup_path is not None: diff --git a/app/classes/web/ajax_handler.py b/app/classes/web/ajax_handler.py index b5be9826..46ff3372 100644 --- a/app/classes/web/ajax_handler.py +++ b/app/classes/web/ajax_handler.py @@ -166,7 +166,7 @@ class AjaxHandler(BaseHandler): output += \ f"""