From 54dc059e1517c81dffbc245dcd687268fcde50b4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 29 May 2026 11:23:55 +0000 Subject: [PATCH] Fix 500 error when char_index contains None key from NULL ROM names Co-authored-by: gantoine <3247106+gantoine@users.noreply.github.com> --- backend/handler/database/roms_handler.py | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/handler/database/roms_handler.py b/backend/handler/database/roms_handler.py index 9e6aa5a9a..b91be4e16 100644 --- a/backend/handler/database/roms_handler.py +++ b/backend/handler/database/roms_handler.py @@ -955,6 +955,7 @@ class DBRomsHandler(DBBaseHandler): session.query( subquery.c.letter, func.min(subquery.c.position - 1).label("position") ) + .filter(subquery.c.letter.isnot(None)) .group_by(subquery.c.letter) .order_by(subquery.c.letter) .all()