From 9ce67efb2629f23f40f124dde16aeaa34581bcb6 Mon Sep 17 00:00:00 2001 From: Kraiem Taha Yassine Date: Wed, 30 Oct 2024 17:37:54 +0100 Subject: [PATCH] fix(chalice): fixed SSO (#2715) --- ee/api/routers/saml.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ee/api/routers/saml.py b/ee/api/routers/saml.py index 2035b9819..d1270f24e 100644 --- a/ee/api/routers/saml.py +++ b/ee/api/routers/saml.py @@ -101,7 +101,7 @@ async def __process_assertion(request: Request, tenant_key=None) -> Response | d role = {"name": existing["roleName"], "roleId": existing["roleId"]} if role is None: for r in role_names: - if r.lower() == existing["roleName"].lower(): + if existing and r.lower() == existing["roleName"].lower(): role = {"roleId": existing["roleId"], "name": r} else: role = roles.get_role_by_name(tenant_id=t['tenantId'], name=r)