diff --git a/accountant/models/accounts.py b/accountant/models/accounts.py index 027eab0..bc9aca2 100644 --- a/accountant/models/accounts.py +++ b/accountant/models/accounts.py @@ -41,8 +41,11 @@ class Account(db.Model): ) def solds(self): - """Return the solds of this account.""" - # TODO Alexis Lahouze 2017-05-04 Rename to "balances" + """Return the balances of this account.""" + return self.balances() + + def balances(self): + """Return the balances of this account.""" return db.session.query( db.func.sum(Operation.value).label("future"), db.func.sum(