[PR #5750/6781dd19 backport][stable-5] bugfixing keycloak user federation failing when updating default mapper simultaneously (#5875)

bugfixing keycloak user federation failing when updating default mapper simultaneously (#5750)

* fix(modules/keycloak_user_federation): fixes ...

... user federation creation failing when also updating/changing default
mappers at the same time

* add changelog fragment for pr

Co-authored-by: Mirko Wilhelmi <Mirko.Wilhelmi@sma.de>
(cherry picked from commit 6781dd1918)

Co-authored-by: morco <thegreatwiper@web.de>
This commit is contained in:
patchback[bot] 2023-01-22 17:44:49 +01:00 committed by GitHub
parent 2c92db98d5
commit b022b87362
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 97 additions and 0 deletions

View file

@ -923,6 +923,8 @@ def main():
updated_mappers = desired_comp.pop('mappers', [])
after_comp = kc.create_component(desired_comp, realm)
cid = after_comp['id']
for mapper in updated_mappers:
found = kc.get_components(urlencode(dict(parent=cid, name=mapper['name'])), realm)
if len(found) > 1: