1
0
Fork 0
mirror of https://github.com/borgbase/vorta synced 2025-02-20 21:36:58 +00:00

Ensure no missing wifi names. (#525)

This commit is contained in:
Manu 2020-08-10 15:00:41 +08:00 committed by GitHub
parent 85eb725059
commit 3640e17270
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -158,7 +158,7 @@ def get_sorted_wifis(profile):
# remove Wifis that were deleted in the system.
deleted_wifis = WifiSettingModel.select() \
.where(WifiSettingModel.ssid.not_in([w['SSIDString'] for w in wifis.values()]))
.where(WifiSettingModel.ssid.not_in([w['SSIDString'] for w in wifis.values() if 'SSIDString' in w]))
for wifi in deleted_wifis:
wifi.delete_instance()