From 4620459b8e164112e85235e842b4c3a1f40f5371 Mon Sep 17 00:00:00 2001 From: Alexis Lahouze Date: Thu, 25 May 2017 22:56:42 +0200 Subject: [PATCH] Rename query function. --- accountant/models/operations.py | 2 +- accountant/views/operations.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/accountant/models/operations.py b/accountant/models/operations.py index 0608bbf..4a2d7ec 100644 --- a/accountant/models/operations.py +++ b/accountant/models/operations.py @@ -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( diff --git a/accountant/views/operations.py b/accountant/views/operations.py index 2e2005a..65be98e 100644 --- a/accountant/views/operations.py +++ b/accountant/views/operations.py @@ -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)