From 5f6d4c8f5f6c6b1e2d773776baef10c10e03ddab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20HUBSCHER?= Date: Tue, 21 Jul 2020 11:28:50 +0200 Subject: [PATCH] Fix subquery. --- ihatemoney/history.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ihatemoney/history.py b/ihatemoney/history.py index 3f99420a..605c1da0 100644 --- a/ihatemoney/history.py +++ b/ihatemoney/history.py @@ -14,9 +14,9 @@ def get_history_queries(project): BillVersion.query.with_entities(BillVersion.id.label("bill_version_id")) .join(Person, BillVersion.payer_id == Person.id) .filter(Person.project_id == project.id) + .values() ) - sub_query = bill_changes.subquery() - bill_changes = BillVersion.query.filter(BillVersion.id.in_(sub_query)) + bill_changes = BillVersion.query.filter(BillVersion.id.in_(bill_changes)) return person_changes, project_changes, bill_changes