Replaced querying the currencies later with the "selectinload" query option in the journal and search reports.
This commit is contained in:
@ -69,7 +69,8 @@ class EntryCollector:
|
||||
pass
|
||||
conditions.append(sa.or_(*sub_conditions))
|
||||
return [ReportEntry(x) for x in JournalEntry.query.filter(*conditions)
|
||||
.options(selectinload(JournalEntry.account))]
|
||||
.options(selectinload(JournalEntry.account),
|
||||
selectinload(JournalEntry.currency))]
|
||||
|
||||
@staticmethod
|
||||
def __get_account_condition(k: str) -> sa.Select:
|
||||
|
Reference in New Issue
Block a user