From c3831e9efe029d6600ba0741b476040ffc941606 Mon Sep 17 00:00:00 2001 From: xeals Date: Sat, 3 Sep 2022 15:29:24 +1000 Subject: [PATCH] routes/home: handle missing groups --- frontpage/routes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontpage/routes.py b/frontpage/routes.py index b9efc27..02da5f4 100644 --- a/frontpage/routes.py +++ b/frontpage/routes.py @@ -29,7 +29,7 @@ def register(auth: OIDCAuthentication, auth_provider: str) -> Blueprint: Renders the home route. """ user_session = UserSession(flask.session) - groups: List[str] = user_session.userinfo["groups"] + groups: List[str] = user_session.userinfo.get("groups") or [] config: Config = current_config() name = config.core.name