diff --git a/pkg/sqlite/query.go b/pkg/sqlite/query.go index 378fe0efe..a45ab4586 100644 --- a/pkg/sqlite/query.go +++ b/pkg/sqlite/query.go @@ -90,6 +90,10 @@ func (qb *queryBuilder) handleStringCriterionInput(c *models.StringCriterionInpu } qb.addWhere(column + " NOT regexp ?") qb.addArg(c.Value) + case models.CriterionModifierIsNull: + qb.addWhere("(" + column + " IS NULL OR TRIM(" + column + ") = '')") + case models.CriterionModifierNotNull: + qb.addWhere("(" + column + " IS NOT NULL AND TRIM(" + column + ") != '')") default: clause, count := getSimpleCriterionClause(modifier, "?") qb.addWhere(column + " " + clause) diff --git a/ui/v2.5/src/components/Changelog/versions/v060.md b/ui/v2.5/src/components/Changelog/versions/v060.md index bb453c598..2eb68aa9a 100644 --- a/ui/v2.5/src/components/Changelog/versions/v060.md +++ b/ui/v2.5/src/components/Changelog/versions/v060.md @@ -6,4 +6,5 @@ * Added Rescan button to scene, image, gallery details overflow button. ### 🐛 Bug fixes +* Change "Is NULL" filter to include empty string values. * Prevent scene card previews playing in full-screen on iOS devices.