fix bug on deletion error

This commit is contained in:
chris 2020-08-09 19:29:50 +02:00
parent 7686fb84cf
commit d7040b84ad

View file

@ -207,7 +207,7 @@ def run_module():
result['return_code'] = delete_req.status_code result['return_code'] = delete_req.status_code
if delete_req.status_code != 204: if delete_req.status_code != 204:
# deletion failed # deletion failed
result['gitea_response'] = create_req.json() result['gitea_response'] = delete_req.json()
module.fail_json(msg="Deletion failed", **result) module.fail_json(msg="Deletion failed", **result)
result['changed'] = True result['changed'] = True
result['state'] = 'absent' result['state'] = 'absent'