From 395d30d9d2f2b7946673d7ae531f236fc58d3eca Mon Sep 17 00:00:00 2001 From: Akos Hencz Date: Tue, 30 Jul 2019 15:37:19 +0200 Subject: [PATCH] Fix get_subgroups iteration --- keycloak/keycloak_admin.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/keycloak/keycloak_admin.py b/keycloak/keycloak_admin.py index 4e2b398..ff3ddbe 100644 --- a/keycloak/keycloak_admin.py +++ b/keycloak/keycloak_admin.py @@ -423,7 +423,10 @@ class KeycloakAdmin: return subgroup elif subgroup["subGroups"]: for subgroup in group["subGroups"]: - return self.get_subgroups(subgroup, path) + result = self.get_subgroups(subgroup, path) + if result: + return result + # went through the tree without hits return None def get_group_members(self, group_id, **query):