Removed unused forms.
This commit is contained in:
parent
aa1550afe3
commit
cdd776c7b8
@ -19,8 +19,6 @@ from flask.ext.restful import Resource, fields, reqparse, marshal_with_field
|
||||
|
||||
from sqlalchemy.orm.exc import NoResultFound
|
||||
|
||||
from forms.accounts import AccountForm
|
||||
|
||||
from accountant import session_scope, session_aware
|
||||
|
||||
from . import auth
|
||||
@ -154,9 +152,6 @@ class AccountResource(Resource):
|
||||
assert (id not in kwargs or kwargs.id is None
|
||||
or kwargs.id == account_id)
|
||||
|
||||
account_form = AccountForm()
|
||||
|
||||
if account_form.validate():
|
||||
try:
|
||||
account = Account.get(session, account_id)
|
||||
except NoResultFound:
|
||||
@ -169,12 +164,6 @@ class AccountResource(Resource):
|
||||
session.merge(account)
|
||||
|
||||
return account
|
||||
else:
|
||||
return json.dumps({
|
||||
'ok': False,
|
||||
'error_type': 'validation',
|
||||
'errors': account_form.errors
|
||||
})
|
||||
|
||||
|
||||
api_api.add_resource(AccountListResource, '/accounts')
|
||||
|
@ -1,9 +0,0 @@
|
||||
from flask_wtf import Form
|
||||
from wtforms import DecimalField, IntegerField, StringField
|
||||
|
||||
class AccountIdForm(Form):
|
||||
id = IntegerField()
|
||||
|
||||
class AccountForm(AccountIdForm):
|
||||
name = StringField()
|
||||
authorized_overdraft = DecimalField()
|
Loading…
Reference in New Issue
Block a user