DeleteUser: do not disable user if already disabled (#64797)

* DeleteUser: do not disable user if already disabled

* add changelog fragment
This commit is contained in:
Bill Dodd 2019-11-20 14:03:19 -06:00 committed by John R Barker
parent b36f572256
commit f51f87a986
2 changed files with 4 additions and 1 deletions

View file

@ -0,0 +1,3 @@
---
bugfixes:
- redfish_command - fix error when deleting a disabled Redfish account (https://github.com/ansible/ansible/issues/64684)

View file

@ -991,7 +991,7 @@ class RedfishUtils(object):
return {'ret': True, 'changed': False}
payload = {'UserName': ''}
if 'Enabled' in data:
if data.get('Enabled', False):
payload['Enabled'] = False
response = self.patch_request(self.root_uri + uri, payload)
if response['ret'] is False: