From 578383411cb339bf5a8eff6d8d1c4f41d3c1bc1d Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Mon, 30 Dec 2024 14:18:11 +0100 Subject: [PATCH] Fix backup remove for alternate locations (#5515) Currently the API converts backup locations on network mounts to the Supervisor's Mount representation. However, the locations stored in the backup representations is a dictionary with the location string as key. Make sure to use the backup location string to validate the remove requests. This fixes removing backups from network storage mounts. --- supervisor/backups/manager.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/supervisor/backups/manager.py b/supervisor/backups/manager.py index e817cc45e..e4e899780 100644 --- a/supervisor/backups/manager.py +++ b/supervisor/backups/manager.py @@ -263,9 +263,10 @@ class BackupManager(FileConfiguration, JobGroup): """Remove a backup.""" targets = ( [ - self._get_location_name(location) + location_name for location in locations - if location in backup.all_locations + if (location_name := self._get_location_name(location)) + in backup.all_locations ] if locations else list(backup.all_locations.keys())