return success whn attempting to destroy a capsul that doesnt exist
This commit is contained in:
parent
f8e187ff84
commit
3346a45ed4
@ -182,6 +182,9 @@ def handle_destroy(operation_id, request_body):
|
||||
return abort(400, f"bad request; email is required for destroy")
|
||||
|
||||
try:
|
||||
vm = current_app.config['SPOKE_MODEL'].get(request_body['id'], False)
|
||||
current_app.logger.warning(f"destroy {request_body['id']} was called for {request_body['email']}, however the vm does not exist. returning success. ")
|
||||
if vm is not None:
|
||||
current_app.config['SPOKE_MODEL'].destroy(id=request_body['id'], email=request_body['email'])
|
||||
except:
|
||||
error_message = my_exec_info_message(sys.exc_info())
|
||||
|
Loading…
Reference in New Issue
Block a user