From 29bab02c648745447b74e135c830fbe0c6ae35af Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Tue, 1 Aug 2023 09:12:52 -0400 Subject: [PATCH] Pass sync code flag in flex report processor --- piker/brokers/ib/_flex_reports.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/piker/brokers/ib/_flex_reports.py b/piker/brokers/ib/_flex_reports.py index 2f34d037..e8c22ecb 100644 --- a/piker/brokers/ib/_flex_reports.py +++ b/piker/brokers/ib/_flex_reports.py @@ -159,7 +159,11 @@ def load_flex_trades( for acctid in trades_by_account: trades_by_id = trades_by_account[acctid] - with open_trade_ledger('ib', acctid) as ledger_dict: + with open_trade_ledger( + 'ib', + acctid, + allow_from_sync_code=True, + ) as ledger_dict: tid_delta = set(trades_by_id) - set(ledger_dict) log.info( 'New trades detected\n'