From b9b47c96f61912bf7589611cd7f0739ed47afab5 Mon Sep 17 00:00:00 2001 From: Aodhan Date: Tue, 8 Jul 2025 23:45:25 +0100 Subject: [PATCH] Fix --- backend/app/router.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/app/router.py b/backend/app/router.py index c63d5ac..1799fe0 100644 --- a/backend/app/router.py +++ b/backend/app/router.py @@ -179,7 +179,8 @@ async def items( where_sql = f"WHERE {' AND '.join(where_clauses)}" if where_clauses else "" - join_sql = "FROM all_items a LEFT JOIN armor_items ai ON ai.id = a.id" + # Removed dependency on armor_items to avoid errors if table is absent + join_sql = "FROM all_items a" # Total count for pagination (exclude limit/offset) count_params = {k: v for k, v in params.items() if k not in ("limit", "offset")} @@ -190,7 +191,7 @@ async def items( # Main query q = text( - f"SELECT a.id, a.name, a.icon_id, a.type_description, ai.jobs_description " + f"SELECT a.id, a.name, a.icon_id, a.type_description, NULL AS jobs_description " f"{join_sql} {where_sql} ORDER BY a.id LIMIT :limit OFFSET :offset" ) result = await session.execute(q, params)