Rename query function.

This commit is contained in:
Alexis Lahouze 2017-05-25 22:56:42 +02:00
parent 82a08b133e
commit 4620459b8e
2 changed files with 2 additions and 2 deletions

View File

@ -88,7 +88,7 @@ class Operation(db.Model):
return query
@classmethod
def get_with_balance(cls, account_id, begin=None, end=None):
def query_with_balance(cls, account_id, begin=None, end=None):
"""Get operations with cumulated balance for a speciific account,
optionally for a specific time period."""
query = db.session.query(

View File

@ -113,7 +113,7 @@ class OperationListResource(Resource):
end = data['end']
return list(result_as_dicts(
Operation.get_with_balance(account_id, begin=begin, end=end)
Operation.query_with_balance(account_id, begin=begin, end=end)
)), 200
@ns.response(201, 'Operation created', operation_model)