Hide synthetic dedupe/reconcile rows from trade list count.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+9
-1
@@ -907,7 +907,14 @@ def register_routes(app: Flask) -> None:
|
||||
account_id = None if u["role"] == "admin" else u.get("account_id")
|
||||
machines, machine_id = _resolve_machine_filter(u, machine_raw)
|
||||
with database.get_db() as conn:
|
||||
total = database.count_trades(conn, account_id=account_id, machine_id=machine_id)
|
||||
database.scrub_synthetic_trade_profits(conn)
|
||||
database.scrub_duplicate_ticket_profits(conn)
|
||||
total = database.count_trades(
|
||||
conn,
|
||||
account_id=account_id,
|
||||
machine_id=machine_id,
|
||||
hide_synthetic=True,
|
||||
)
|
||||
total_pages = max(1, (total + per_page - 1) // per_page)
|
||||
if page > total_pages:
|
||||
page = total_pages
|
||||
@@ -918,6 +925,7 @@ def register_routes(app: Flask) -> None:
|
||||
account_id=account_id,
|
||||
machine_id=machine_id,
|
||||
offset=offset,
|
||||
hide_synthetic=True,
|
||||
)
|
||||
for t in trades:
|
||||
_annotate_trade_times(t)
|
||||
|
||||
Reference in New Issue
Block a user