From 6330b52fd4565795b202b15b333a38855d5cd243 Mon Sep 17 00:00:00 2001 From: Jason Antman Date: Sat, 10 Mar 2018 17:25:45 -0500 Subject: [PATCH] Fix bug in /budgets view where "Spending By Budget, Per Calendar Month" chart was showing only inactive budgets instead of only active budgets --- CHANGES.rst | 2 +- biweeklybudget/flaskapp/views/budgets.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index bb4aac61..5709527e 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -50,7 +50,7 @@ Unreleased Changes * Change ``OFXTransaction.unreconciled`` to filter out OFXTransactions with any of the ``is_*`` set to True. * Upgrade chromedriver in TravisCI builds from 2.33 to 2.36, to fix failing acceptance tests caused by Ubuntu upgrade from Chrome 64 to 65. - +* Fix bug in ``/budgets`` view where "Spending By Budget, Per Calendar Month" chart was showing only inactive budgets instead of only active budgets. 0.7.1 (2018-01-10) ------------------ diff --git a/biweeklybudget/flaskapp/views/budgets.py b/biweeklybudget/flaskapp/views/budgets.py index 202a016e..e06c37cd 100644 --- a/biweeklybudget/flaskapp/views/budgets.py +++ b/biweeklybudget/flaskapp/views/budgets.py @@ -349,7 +349,7 @@ def _by_month(self): budgets_present = set() for t in db_session.query(Transaction).filter( Transaction.budget_transactions.any( - BudgetTransaction.budget.has(is_active=False) + BudgetTransaction.budget.has(is_active=True) ), Transaction.date.__le__(dt_now) ).all():