From 701e4674ea5d55287c7fa7dd23d27325cbe668b3 Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Thu, 21 May 2026 02:15:18 +0200 Subject: [PATCH] Fix gql Filter UnsupportedOperationException (#2063) --- CHANGELOG.md | 1 + .../kotlin/suwayomi/tachidesk/graphql/queries/filter/Filter.kt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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) }