fix: resolve KeyError 'data_dir' when running trade execution

PortfolioRepository expects its own portfolio config (with data_dir),
not DEFAULT_CONFIG. Passing config=self.config caused a KeyError because
DEFAULT_CONFIG has no data_dir key. Removing the argument lets the
repository call get_portfolio_config() which provides the correct defaults.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Ahmet Guzererler 2026-03-24 00:11:07 +01:00
parent 8461ed540e
commit 0951ef17ec
1 changed files with 1 additions and 1 deletions

View File

@ -390,7 +390,7 @@ class LangGraphEngine:
_store = store or ReportStore() _store = store or ReportStore()
try: try:
repo = PortfolioRepository(config=self.config) repo = PortfolioRepository()
executor = TradeExecutor(repo=repo, config=self.config) executor = TradeExecutor(repo=repo, config=self.config)
# Execute decisions # Execute decisions