fix: don't fail a migration if there is no filter saved

This commit is contained in:
kolaente 2022-08-17 12:27:03 +02:00
parent d709db4e18
commit 10ded56f66
Signed by untrusted user: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 5 additions and 1 deletions

View File

@ -40,7 +40,11 @@ func init() {
for _, f := range filters {
filter := map[string]interface{}{}
err = json.Unmarshal([]byte(f["filters"].(string)), &filter)
filterJSON, is := f["filters"].(string)
if !is {
continue
}
err = json.Unmarshal([]byte(filterJSON), &filter)
if err != nil {
return err
}