Replaced "sa.select" with "sa.Select" in the account_options pseudo property of the IncomeExpenses report.

This commit is contained in:
依瑪貓 2023-03-05 22:30:09 +08:00
parent 90289a0db2
commit ace782a26b

View File

@ -622,7 +622,7 @@ class IncomeExpenses(JournalEntryReport[IncomeExpensesRow]):
period=self.period) period=self.period)
in_use: set[int] = set(db.session.scalars( in_use: set[int] = set(db.session.scalars(
sa.select(JournalEntry.account_id) sa.Select(JournalEntry.account_id)
.join(Account) .join(Account)
.filter(JournalEntry.currency_code == self.currency.code, .filter(JournalEntry.currency_code == self.currency.code,
sa.or_(Account.base_code.startswith("11"), sa.or_(Account.base_code.startswith("11"),