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
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

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
}