From 0a62968ef283e069046b86efa1c3ae13bd573c25 Mon Sep 17 00:00:00 2001 From: Akshat Date: Tue, 1 Dec 2026 10:50:46 +0530 Subject: [PATCH] Fix 500 when filtering the dataset list by data_id bindparams() returns a new clause, but the result was discarded, so the id list was passed to the driver as a plain parameter. PyMySQL 1.2.4 no longer escapes lists, which turns this into a TypeError. Fixes #381 --- src/routers/datasets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routers/datasets.py b/src/routers/datasets.py index 177be32c..75733407 100644 --- a/src/routers/datasets.py +++ b/src/routers/datasets.py @@ -293,7 +293,7 @@ async def list_datasets( # noqa: PLR0913, C901 ) if data_id: - matching_filter.bindparams(bindparam("data_ids", expanding=True)) + matching_filter = matching_filter.bindparams(bindparam("data_ids", expanding=True)) result = await expdb_db.execute( matching_filter, params=parameters,