[sso-admin] Fix regression on new installations
When introducing typing, we erroneously started passing an empty parent Id instead of None, and the underlying Keycloak library failed to create the groups. Closes #15mejoras_instalacion
parent
3f08973d7c
commit
2d057ec6bc
|
@ -321,9 +321,10 @@ class KeycloakClient:
|
||||||
|
|
||||||
def add_group(self, name : str, parent : str="", skip_exists : bool=False) -> Any:
|
def add_group(self, name : str, parent : str="", skip_exists : bool=False) -> Any:
|
||||||
self.connect()
|
self.connect()
|
||||||
|
parentId : Optional[str] = None
|
||||||
if parent:
|
if parent:
|
||||||
parent = self.get_group_by_path(parent)["id"]
|
parentId = self.get_group_by_path(parent)["id"]
|
||||||
return self.keycloak_admin.create_group({"name": name}, parent=parent)
|
return self.keycloak_admin.create_group({"name": name}, parent=parentId)
|
||||||
|
|
||||||
def delete_group(self, group_id : str) -> Any:
|
def delete_group(self, group_id : str) -> Any:
|
||||||
self.connect()
|
self.connect()
|
||||||
|
|
Loading…
Reference in New Issue