From 26e7d578c7069816eecb600c123c2a3d7663a2eb Mon Sep 17 00:00:00 2001 From: Alexis Lahouze Date: Fri, 7 Jul 2017 17:38:35 +0200 Subject: [PATCH] Fix subquery. --- accountant/models/accounts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accountant/models/accounts.py b/accountant/models/accounts.py index d5924d5..2ba40c9 100644 --- a/accountant/models/accounts.py +++ b/accountant/models/accounts.py @@ -195,7 +195,7 @@ class Account(db.Model): ) if end: - query = query.filter(query.c.operation_date <= str(end)) + query = query.filter(base_query.c.operation_date <= str(end)) elif end: query = query.filter(Operation.operation_date <= str(end))