diff --git a/accountant/views/accounts.py b/accountant/views/accounts.py index 83e5ba8..3927a7a 100644 --- a/accountant/views/accounts.py +++ b/accountant/views/accounts.py @@ -7,7 +7,7 @@ import dateutil.parser from flask_jwt_extended import jwt_required from flask_restplus import Namespace, Resource, fields -from ..models import db +from ..models import db, row_as_dict from ..models.accounts import Account from ..models.operations import Operation @@ -268,7 +268,9 @@ class BalancesResource(Resource): # Note: if we don't pass the code, the result is seen as a tuple and # causes error on marshalling. - return account.balances(), 200 + return row_as_dict( + account.balances() + ), 200 @ns.route('//balance')