diff --git a/app.py b/app.py index db03caf..6376787 100644 --- a/app.py +++ b/app.py @@ -560,7 +560,7 @@ class SkuldHandler(BaseHTTPRequestHandler): sql = ( "SELECT t.*, m.name AS market_name, d.name AS to_market_name," " COALESCE(SUM(c.cost_ore), 0) AS cost_ore" - " FROM transactions t JOIN markets m ON m.id = t.market_id" + " FROM transactions t LEFT JOIN markets m ON m.id = t.market_id" " LEFT JOIN markets d ON d.id = t.to_market_id" " LEFT JOIN lot_consumptions c ON c.tx_id = t.id" ) @@ -572,7 +572,7 @@ class SkuldHandler(BaseHTTPRequestHandler): rows = conn.execute(sql, values).fetchall() finally: conn.close() - return [dict(row) for row in rows] + return [_with_price(dict(row)) for row in rows] def transactions_get(self, params, query, body): tx_id = _as_int(params["id"], "id")