mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-19 15:16:33 +00:00
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.
This commit is contained in:
parent
dbd37d6575
commit
578383411c
@ -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())
|
||||
|
Loading…
x
Reference in New Issue
Block a user