cyberia-prod #14

Open
forest wants to merge 12 commits from cyberia-prod into master
Showing only changes of commit 3346a45ed4 - Show all commits

View File

@ -182,7 +182,10 @@ def handle_destroy(operation_id, request_body):
return abort(400, f"bad request; email is required for destroy") return abort(400, f"bad request; email is required for destroy")
try: try:
current_app.config['SPOKE_MODEL'].destroy(id=request_body['id'], email=request_body['email']) 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: except:
error_message = my_exec_info_message(sys.exc_info()) error_message = my_exec_info_message(sys.exc_info())
params = f"email='{request_body['email'] if 'email' in request_body else 'KeyError'}', " params = f"email='{request_body['email'] if 'email' in request_body else 'KeyError'}', "