Add commit to have updated model objects in return.
This commit is contained in:
parent
16979bfc0b
commit
02f14863b1
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user