fix corporate action runtime blockers

This commit is contained in:
2026-09-13 14:22:41 +09:00
parent 925c6b4fa4
commit fa824dfd36
4 changed files with 70 additions and 4 deletions
+2 -2
View File
@@ -7,7 +7,7 @@ from typing import Callable, Protocol
from app.domain.models import LedgerEntry, LiveAssetSource, Portfolio, StrategySet
_NOT_FOUND_MSG = "포트폴리오를 찾을 수 없습니다"
PORTFOLIO_NOT_FOUND_MESSAGE = "포트폴리오를 찾을 수 없습니다"
_INVEST_ACTION_MAP = {
"deposit": "INVEST",
"profit": "PROFIT",
@@ -250,7 +250,7 @@ def apply_reset(
portfolio = repo.reset(portfolio_id)
return portfolio, False
except ValueError as exc:
if str(exc) != _NOT_FOUND_MSG:
if str(exc) != PORTFOLIO_NOT_FOUND_MESSAGE:
raise
symbol = infer_symbol(portfolio_id)
portfolio = repo.get_or_create(portfolio_id, symbol, initial_cash=0.0)