Fix balances returning.
This commit is contained in:
parent
61e9f036c1
commit
a664c661ed
@ -7,7 +7,7 @@ import dateutil.parser
|
|||||||
from flask_jwt_extended import jwt_required
|
from flask_jwt_extended import jwt_required
|
||||||
from flask_restplus import Namespace, Resource, fields
|
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.accounts import Account
|
||||||
from ..models.operations import Operation
|
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
|
# Note: if we don't pass the code, the result is seen as a tuple and
|
||||||
# causes error on marshalling.
|
# causes error on marshalling.
|
||||||
return account.balances(), 200
|
return row_as_dict(
|
||||||
|
account.balances()
|
||||||
|
), 200
|
||||||
|
|
||||||
|
|
||||||
@ns.route('/<int:account_id>/balance')
|
@ns.route('/<int:account_id>/balance')
|
||||||
|
Loading…
Reference in New Issue
Block a user