mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
keycloak_user: avoid error when trying to delete a non-existing user (#7696)
* avoid error when trying to delete a non-existing user when force is set, but the user doesn't exist yet, this fails. * 7696-avoid-attempt-to-delete-non-existing-user add changelog entry * rename changelog file * Update changelogs/fragments/7696-avoid-attempt-to-delete-non-existing-user.yml Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
@@ -481,7 +481,7 @@ def main():
|
||||
|
||||
else:
|
||||
after_user = {}
|
||||
if force: # If the force option is set to true
|
||||
if force and before_user: # If the force option is set to true
|
||||
# Delete the existing user
|
||||
kc.delete_user(user_id=before_user["id"], realm=realm)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user