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)