diff --git a/app/auth/routes.py b/app/auth/routes.py index b6a0df9a7..5c9848286 100644 --- a/app/auth/routes.py +++ b/app/auth/routes.py @@ -56,7 +56,9 @@ def login(): @bp.route("/logout") def logout() -> flask.Response: "Logout a scodoc user. If CAS session, logout from CAS. Redirect." - current_app.logger.info(f"logout user {current_user.user_name}") + if current_user: + user_name = getattr(current_user, "user_name", "anonymous") + current_app.logger.info(f"logout user {user_name}") logout_user() if ScoDocSiteConfig.is_cas_enabled() and flask.session.get("scodoc_cas_login_date"): flask.session.pop("scodoc_cas_login_date", None) diff --git a/sco_version.py b/sco_version.py index 17cdecb70..53ca17870 100644 --- a/sco_version.py +++ b/sco_version.py @@ -1,7 +1,7 @@ # -*- mode: python -*- # -*- coding: utf-8 -*- -SCOVERSION = "9.4.54" +SCOVERSION = "9.4.55" SCONAME = "ScoDoc"