fix: align schema 15 settlement tests and integer validation
This commit is contained in:
@@ -25,7 +25,7 @@ def create_ledger_account(name: str, type: str = "bank", institution: str = "",
|
||||
if last_balance is not None:
|
||||
try:
|
||||
from .account_valuation_service import _strict_int
|
||||
last_balance = _strict_int(last_balance, "last_balance", allow_none=False)
|
||||
last_balance = _strict_int(last_balance, "last_balance")
|
||||
except (ValueError, TypeError) as e:
|
||||
return fail("validation_error", str(e))
|
||||
with db(db_path) as conn:
|
||||
@@ -49,7 +49,7 @@ def update_ledger_account(account_id: str, db_path: str | None = None, **fields:
|
||||
if balance_update:
|
||||
try:
|
||||
from .account_valuation_service import _strict_int
|
||||
normalized_balance = _strict_int(fields["last_balance"], "last_balance", allow_none=False)
|
||||
normalized_balance = _strict_int(fields["last_balance"], "last_balance")
|
||||
except (ValueError, TypeError) as e:
|
||||
return fail("validation_error", str(e))
|
||||
normalized_basis = None
|
||||
|
||||
Reference in New Issue
Block a user