fix: restore snapshot admin CI validation
This commit is contained in:
@@ -908,6 +908,8 @@ def validate_account_snapshot_rows(rows: list[dict[str, Any]]) -> list[str]:
|
||||
errors.append(f"account_snapshot row {idx}: invalid account_type {account_type!r}")
|
||||
if not ticker and name != "예수금/D+2현금":
|
||||
errors.append(f"account_snapshot row {idx}: ticker required")
|
||||
if ticker and not re.fullmatch(r"(?:\d{6}|[A-Z0-9]{6}|[A-Z]{1,5})", ticker):
|
||||
errors.append(f"account_snapshot row {idx}: ticker must be 6 digits or an uppercase symbol")
|
||||
if not name:
|
||||
errors.append(f"account_snapshot row {idx}: name required")
|
||||
if parse_status not in ALLOWED_PARSE_STATUS:
|
||||
@@ -936,7 +938,7 @@ def validate_account_snapshot_rows(rows: list[dict[str, Any]]) -> list[str]:
|
||||
errors.append(f"account_snapshot row {idx}: CAPTURE_READ_OK rows require user_confirmed=Y")
|
||||
if entry_stage and canonical.get("entry_stage", {}).get("allowed") and entry_stage not in canonical["entry_stage"]["allowed"]:
|
||||
errors.append(f"account_snapshot row {idx}: invalid entry_stage {entry_stage!r}")
|
||||
if position_type and canonical.get("position_type", {}).get("allowed") and position_type not in canonical["position_type"]["allowed"]:
|
||||
if position_type and name != "예수금/D+2현금" and canonical.get("position_type", {}).get("allowed") and position_type not in canonical["position_type"]["allowed"]:
|
||||
errors.append(f"account_snapshot row {idx}: invalid position_type {position_type!r}")
|
||||
return errors
|
||||
|
||||
|
||||
Reference in New Issue
Block a user