Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions ibmsecurity/isam/web/http_transformation.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ def delete(isamAppliance, id, check_mode=False, force=False):
"""
Deleting a HTTP Transformation
"""
#check if transformation exists before deleting
# use get_all and search result because get errors with 404 if transform doesn't exist
ret_obj_content = get_all(isamAppliance)
if not next((item for item in ret_obj_content['data'] if item["id"] == id), None):
return isamAppliance.create_return_object(changed=False)

if force is True or _check(isamAppliance, id) is True:
if check_mode is True:
return isamAppliance.create_return_object(changed=True)
Expand Down