Fixed the incorrect query in the "offsets" pseudo property of the LineItemForm form.

This commit is contained in:
依瑪貓 2023-04-07 15:11:04 +08:00
parent 7026ed3a65
commit 27fb44937d

View File

@ -350,10 +350,7 @@ class LineItemForm(FlaskForm):
.order_by(JournalEntry.date, JournalEntry.no,
JournalEntryLineItem.no)\
.options(selectinload(JournalEntryLineItem.journal_entry),
selectinload(JournalEntryLineItem.account),
selectinload(JournalEntryLineItem.offsets)
.selectinload(
JournalEntryLineItem.journal_entry)).all()
selectinload(JournalEntryLineItem.account)).all()
setattr(self, "__offsets", get_offsets())
return getattr(self, "__offsets")