diff --git a/CHANGELOG.md b/CHANGELOG.md index 61147f12e..8c17c85ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - (**Chapter**) Fix losing chapter data on failed chapter list update - (**Chapter**) Fix database error when fetching chapter updates - (**Manga/API**) Fix "mangas" graphql query with active sorting and using a postgresql database (QUERY "mangas") +- (**API**) Fix GraphQL `Filter` causing an UnsupportedOperationException when passing an empty list as a `Any` filter value ## [v2.2.2100] + [WebUI: v20260508.01] - 2026-05-08 diff --git a/server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/filter/Filter.kt b/server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/filter/Filter.kt index f1086ca45..ce9833f3d 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/filter/Filter.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/graphql/queries/filter/Filter.kt @@ -547,7 +547,7 @@ class OpAnd( andPart: (T) -> Op, ) { values ?: return - val expr = values.map { andPart(it) }.reduce { acc, op -> acc or op } + val expr = values.map { andPart(it) }.reduceOrNull { acc, op -> acc or op } ?: return op = if (op == null) expr else (op!! and expr) }