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:
parent
8461ed540e
commit
0951ef17ec
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue