From edd9b0d6646481ced663efeb067a33ba7fcd7988 Mon Sep 17 00:00:00 2001 From: "Bob.Hou" Date: Tue, 4 Aug 2026 09:05:48 -0400 Subject: [PATCH] fix(combos): include id column in getCombos query (#8905) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit getCombos() SELECT was missing the id column, so returned combo objects had their id come only from the JSON data blob. If the data blob lacked an id field, callers (including the Dashboard) saw null — making the combo appear to have no primary key and impossible to delete. Add id to the SELECT so the database column value is always available. Signed-off-by: Minxi Hou --- src/lib/db/combos.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/db/combos.ts b/src/lib/db/combos.ts index a32f9931eb..4d48a106f1 100644 --- a/src/lib/db/combos.ts +++ b/src/lib/db/combos.ts @@ -96,7 +96,7 @@ function getNextSortOrder() { export async function getCombos(limit?: number, offset?: number) { const db = getDbInstance(); let sql = - "SELECT data, sort_order, context_cache_protection FROM combos ORDER BY sort_order ASC, name COLLATE NOCASE ASC"; + "SELECT id, data, sort_order, context_cache_protection FROM combos ORDER BY sort_order ASC, name COLLATE NOCASE ASC"; const params: unknown[] = []; if (limit !== undefined) { sql += " LIMIT ? OFFSET ?";