Fixing 'tags'' field from old installs (0.43.0+) could have wrong data-type causing crash

pull/2440/head
dgtlmoon 2024-07-04 15:23:06 +02:00 zatwierdzone przez GitHub
rodzic bed16009bb
commit 01f910f840
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 5 dodań i 0 usunięć

Wyświetl plik

@ -843,3 +843,8 @@ class ChangeDetectionStore:
# Something custom here
self.__data["watching"][uuid]['time_between_check_use_default'] = False
# Correctly set datatype for older installs where 'tag' was string and update_12 did not catch it
def update_16(self):
for uuid, watch in self.data['watching'].items():
if isinstance(watch.get('tags'), str):
self.data['watching'][uuid]['tags'] = []