Skip to content

Commit

Permalink
fix: linter check.
Browse files Browse the repository at this point in the history
  • Loading branch information
marcospereirampj committed Feb 13, 2024
1 parent 039cd75 commit 16eec61
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/keycloak/keycloak_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -1292,7 +1292,7 @@ def get_groups(self, query=None):
# For version +23.0.0
for group in groups:
if group.get("subGroupCount"):
group["subGroups"] = self.get_group_children(group.get('id'))
group["subGroups"] = self.get_group_children(group.get("id"))

return groups

Expand All @@ -1318,7 +1318,7 @@ def get_group(self, group_id):
# For version +23.0.0
group = response.json()
if group.get("subGroupCount"):
group["subGroups"] = self.get_group_children(group.get('id'))
group["subGroups"] = self.get_group_children(group.get("id"))

return group

Expand Down Expand Up @@ -1351,18 +1351,17 @@ def get_subgroups(self, group, path):
def get_group_children(self, group_id):
"""Get group children by id.
Returns full group details
GroupRepresentation
https://www.keycloak.org/docs-api/18.0/rest-api/#_grouprepresentation
Returns full group children details
:param group_id: The group id
:type group_id: str
:return: Keycloak server response (GroupRepresentation)
:rtype: dict
"""
params_path = {"realm-name": self.connection.realm_name, "id": group_id}
data_raw = self.connection.raw_get(urls_patterns.URL_ADMIN_GROUP_CHILD.format(**params_path))
data_raw = self.connection.raw_get(
urls_patterns.URL_ADMIN_GROUP_CHILD.format(**params_path)
)
return raise_error_from_response(data_raw, KeycloakGetError)

def get_group_members(self, group_id, query=None):
Expand Down

0 comments on commit 16eec61

Please sign in to comment.