Skip to content

Commit

Permalink
Fix backup remove for alternate locations
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
agners committed Dec 30, 2024
1 parent dbd37d6 commit 94a7005
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions supervisor/backups/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 94a7005

Please sign in to comment.