List transactions without an account too, with their price

This commit is contained in:
ai-bot committed 2026-11-14 18:03:28 +00:00
1 parent b59cc286af
commit 597b6abc77
1 file changed
+2 -2
+2 -2
View File
@@ -560,7 +560,7 @@ class SkuldHandler(BaseHTTPRequestHandler):
sql = ( sql = (
"SELECT t.*, m.name AS market_name, d.name AS to_market_name," "SELECT t.*, m.name AS market_name, d.name AS to_market_name,"
" COALESCE(SUM(c.cost_ore), 0) AS cost_ore" " 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 markets d ON d.id = t.to_market_id"
" LEFT JOIN lot_consumptions c ON c.tx_id = t.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() rows = conn.execute(sql, values).fetchall()
finally: finally:
conn.close() 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): def transactions_get(self, params, query, body):
tx_id = _as_int(params["id"], "id") tx_id = _as_int(params["id"], "id")