Migrate from SQLAlchemy 1.x legacy Query API to 2.x style select/delete statements

This commit is contained in:
2026-04-06 01:06:01 +08:00
parent 356950e2c7
commit 970c2e9946
39 changed files with 372 additions and 275 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ from ..utils.title_case import title_case
def init_base_accounts_command() -> None:
"""Initializes the base accounts."""
if BaseAccount.query.first() is not None:
if db.session.scalar(sa.select(BaseAccount)) is not None:
return
with open(data_dir / "base_accounts.csv") as fp: