[PR #8923/83080cc0 backport][stable-9] keycloak_userprofile: fix empty response by removing `parent` filter when fetching userprofile component (#8960)

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 <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 83080cc005)

Co-authored-by: fgruenbauer <gruenbauer@b1-systems.de>
pull/8967/head
patchback[bot] 2024-10-02 09:55:34 +03:00 committed by GitHub
parent 185bdaaa39
commit bf4e5dc3c0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View File

@ -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).

View File

@ -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.