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)