From 83080cc0054b62c0c4624e66ce4501cf14fc0b21 Mon Sep 17 00:00:00 2001 From: fgruenbauer Date: Wed, 2 Oct 2024 08:48:04 +0200 Subject: [PATCH] keycloak_userprofile: fix empty response by removing `parent` filter when fetching userprofile component (#8923) * remove parent filter when fetching userprofile component * add changelog fragment * Update changelogs/fragments/8923-keycloak_userprofile-fix-empty-response-when-fetching-userprofile.yml Co-authored-by: Felix Fontein --------- Co-authored-by: Felix Fontein --- ...userprofile-fix-empty-response-when-fetching-userprofile.yml | 2 ++ plugins/modules/keycloak_userprofile.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/8923-keycloak_userprofile-fix-empty-response-when-fetching-userprofile.yml diff --git a/changelogs/fragments/8923-keycloak_userprofile-fix-empty-response-when-fetching-userprofile.yml b/changelogs/fragments/8923-keycloak_userprofile-fix-empty-response-when-fetching-userprofile.yml new file mode 100644 index 0000000000..5b3c18ba2c --- /dev/null +++ b/changelogs/fragments/8923-keycloak_userprofile-fix-empty-response-when-fetching-userprofile.yml @@ -0,0 +1,2 @@ +bugfixes: + - keycloak_userprofile - fix empty response when fetching userprofile component by removing ``parent=parent_id`` filter (https://github.com/ansible-collections/community.general/pull/8923). \ No newline at end of file diff --git a/plugins/modules/keycloak_userprofile.py b/plugins/modules/keycloak_userprofile.py index ba5dc127d2..55971cbf42 100644 --- a/plugins/modules/keycloak_userprofile.py +++ b/plugins/modules/keycloak_userprofile.py @@ -641,7 +641,7 @@ def main(): changeset_copy = deepcopy(changeset) # Get a list of all Keycloak components that are of userprofile provider type. - realm_userprofiles = kc.get_components(urlencode(dict(type=provider_type, parent=parent_id)), parent_id) + realm_userprofiles = kc.get_components(urlencode(dict(type=provider_type)), parent_id) # If this component is present get its userprofile ID. Confusingly the userprofile ID is # also known as the Provider ID.