Fix broken isMissing filters (#1000)

This commit is contained in:
InfiniteTF 2020-12-17 20:27:44 +01:00 committed by GitHub
parent f264baa330
commit 99bd7bc750
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -337,7 +337,7 @@ func (qb *ImageQueryBuilder) Query(imageFilter *ImageFilterType, findFilter *Fin
case "tags":
query.addWhere("tags_join.image_id IS NULL")
default:
query.addWhere("images." + *isMissingFilter + " IS NULL OR TRIM(images." + *isMissingFilter + ") = ''")
query.addWhere("(images." + *isMissingFilter + " IS NULL OR TRIM(images." + *isMissingFilter + ") = '')")
}
}

View file

@ -240,7 +240,7 @@ func (qb *PerformerQueryBuilder) Query(performerFilter *PerformerFilterType, fin
case "stash_id":
query.addWhere("performer_stash_ids.performer_id IS NULL")
default:
query.addWhere("performers." + *isMissingFilter + " IS NULL OR TRIM(performers." + *isMissingFilter + ") = ''")
query.addWhere("(performers." + *isMissingFilter + " IS NULL OR TRIM(performers." + *isMissingFilter + ") = '')")
}
}

View file

@ -373,7 +373,7 @@ func (qb *SceneQueryBuilder) Query(sceneFilter *SceneFilterType, findFilter *Fin
case "stash_id":
query.addWhere("scene_stash_ids.scene_id IS NULL")
default:
query.addWhere("scenes." + *isMissingFilter + " IS NULL OR TRIM(scenes." + *isMissingFilter + ") = ''")
query.addWhere("(scenes." + *isMissingFilter + " IS NULL OR TRIM(scenes." + *isMissingFilter + ") = '')")
}
}