From 27fb44937d84ff5e3ef482b53d1a9958e49ee2c7 Mon Sep 17 00:00:00 2001 From: imacat Date: Fri, 7 Apr 2023 15:11:04 +0800 Subject: [PATCH] Fixed the incorrect query in the "offsets" pseudo property of the LineItemForm form. --- src/accounting/journal_entry/forms/line_item.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/accounting/journal_entry/forms/line_item.py b/src/accounting/journal_entry/forms/line_item.py index 0d586d4..a6b2407 100644 --- a/src/accounting/journal_entry/forms/line_item.py +++ b/src/accounting/journal_entry/forms/line_item.py @@ -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")