From 3708fc637ab37b92197e5d414676ff11e51384ac Mon Sep 17 00:00:00 2001 From: Alexis Lahouze Date: Fri, 10 Jul 2015 14:55:29 +0200 Subject: [PATCH] Remove unused function. --- accountant/api/views/accounts.py | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/accountant/api/views/accounts.py b/accountant/api/views/accounts.py index edb60cf..70e2fb5 100644 --- a/accountant/api/views/accounts.py +++ b/accountant/api/views/accounts.py @@ -16,36 +16,19 @@ """ import dateutil.parser -from flask import json from flask.ext.restful import Resource, fields, reqparse, marshal_with_field from sqlalchemy.orm.exc import NoResultFound -from accountant import session_scope, session_aware +from accountant import session_aware -from . import auth -from .. import api, api_api +from .. import api_api from ..models.accounts import Account -from ..models.entries import Entry from ..fields import Object -# TODO Alexis Lahouze 2015-06-13 Remove this function and use only time range -# based queries. -@api.route("/accounts//months") -@auth.login_required -def get_months(account_id): - with session_scope() as session: - query = Entry.get_months_for_account(session, account_id) - - return json.dumps([{ - "year": i.year, - "month": i.month.rjust(2, '0') - } for i in query.all()]) - - resource_fields = { 'id': fields.Integer(default=None), 'name': fields.String,