Add commit to have updated model objects in return.

This commit is contained in:
Alexis Lahouze 2017-07-07 17:39:48 +02:00
parent 16979bfc0b
commit 02f14863b1

View File

@ -143,6 +143,8 @@ class OperationListResource(Resource):
db.session.add(operation) # pylint: disable=no-member db.session.add(operation) # pylint: disable=no-member
db.session.commit()
return operation, 201 return operation, 201
@ -203,6 +205,8 @@ class OperationResource(Resource):
db.session.merge(operation) # pylint: disable=no-member db.session.merge(operation) # pylint: disable=no-member
db.session.commit()
return operation, 200 return operation, 200
@ns.response(204, 'Operation deleted', operation_model) @ns.response(204, 'Operation deleted', operation_model)