From 6b0f1853c38e9de8b830cbbdad7613f46a868c2b Mon Sep 17 00:00:00 2001 From: Emi Matchu Date: Tue, 27 Feb 2024 17:33:01 -0800 Subject: [PATCH] Oops, fix error in modeling query on homepage Okay, legit, I'm reading over this and I don't understand why `item_id` isn't working here? It seems like we have `SELECT DISTINCT items.id AS item_id`, and we use it in the `ORDER BY` clause right below. And I don't see why, presumably, it's our item translations changes that broke this? But in any case, okay! This fixes it! Moving on! --- src/server/loaders.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/loaders.js b/src/server/loaders.js index cc8f38d..95a0664 100644 --- a/src/server/loaders.js +++ b/src/server/loaders.js @@ -460,7 +460,7 @@ async function runItemModelingQuery(db, filterToItemIds) { } else { // Or, to filter to certain items, we add their IDs to the WHERE clause. const qs = filterToItemIds.map((_) => "?").join(", "); - itemIdsCondition = `(item_id IN (${qs}))`; + itemIdsCondition = `(items.id IN (${qs}))`; itemIdsValues = filterToItemIds; }