From 94a700514ecd2e46ba1f6e6773421818ede9e5a4 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Mon, 30 Dec 2024 10:51:51 +0100 Subject: [PATCH] Fix backup remove for alternate locations 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/supervisor/backups/manager.py b/supervisor/backups/manager.py index e817cc45e59..cf0f825d89a 100644 --- a/supervisor/backups/manager.py +++ b/supervisor/backups/manager.py @@ -263,9 +263,9 @@ def remove( """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())