Compare commits

..

No commits in common. "develop" and "master" have entirely different histories.

5 changed files with 7 additions and 13 deletions

View File

@ -195,7 +195,7 @@ class Account(db.Model):
)
if end:
query = query.filter(base_query.c.operation_date <= str(end))
query = query.filter(query.c.operation_date <= str(end))
elif end:
query = query.filter(Operation.operation_date <= str(end))

View File

@ -24,8 +24,6 @@ def users():
@users.command()
@click.argument('email')
@click.argument('password')
def add(email, password):
""" Add a new user. """
user = User()

View File

@ -122,7 +122,7 @@ range_parser.add_argument(
# pylint: disable=no-self-use
@ns.route('')
@ns.route('/')
@ns.doc(
security='apikey',
responses={
@ -205,7 +205,7 @@ class AccountResource(Resource):
data = self.api.payload
# Check ID consistency.
if data.get('id', account_id) != account_id:
if data.get('id', default=account_id) != account_id:
ns.abort(406, 'Id must not be provided or changed on update.')
# Need to get the object to update it.

View File

@ -90,7 +90,7 @@ account_range_parser.add_argument(
# pylint: disable=no-self-use
@ns.route('')
@ns.route('/')
@ns.doc(
security='apikey',
responses={
@ -143,8 +143,6 @@ class OperationListResource(Resource):
db.session.add(operation) # pylint: disable=no-member
db.session.commit()
return operation, 201
@ -187,7 +185,7 @@ class OperationResource(Resource):
data = self.api.payload
# Check ID consistency.
if data.get('id', operation_id) != operation_id:
if data.get('id', default=operation_id) != operation_id:
ns.abort(406, 'Id must not be provided or changed on update.')
# pylint: disable=no-member
@ -205,8 +203,6 @@ class OperationResource(Resource):
db.session.merge(operation) # pylint: disable=no-member
db.session.commit()
return operation, 200
@ns.response(204, 'Operation deleted', operation_model)

View File

@ -68,7 +68,7 @@ account_id_parser.add_argument(
# pylint: disable=no-self-use
@ns.route('')
@ns.route('/')
@ns.doc(
security='apikey',
responses={
@ -160,7 +160,7 @@ class ScheduledOperationResource(Resource):
so_id = scheduled_operation_id
# Check ID consistency.
if data.get('id', so_id) != so_id:
if data.get('id', default=so_id) != so_id:
ns.abort(406, 'Id must not be provided or changed on update.')
scheduled_operation = ScheduledOperation.query().get(so_id)