diff --git a/documentation/changelog.rst b/documentation/changelog.rst index d5a24a9a5..5fef02082 100644 --- a/documentation/changelog.rst +++ b/documentation/changelog.rst @@ -10,6 +10,10 @@ New features ----------- * Allow plugins to overwrite UI routes and customise the teaser on the login form [see `PR #106 `_] +Bugfixes +----------- +* Prevent logging out user when clearing the session [see `PR #112 `_] + Infrastructure / Support ---------------------- * Make assets use MW as their default unit and enforce that in CLI, as well (API already did) [see `PR #108 `_] diff --git a/flexmeasures/ui/utils/view_utils.py b/flexmeasures/ui/utils/view_utils.py index 50f9674f2..8e6c83cc3 100644 --- a/flexmeasures/ui/utils/view_utils.py +++ b/flexmeasures/ui/utils/view_utils.py @@ -91,7 +91,9 @@ def render_flexmeasures_template(html_filename: str, **variables): def clear_session(): for skey in [ - k for k in session.keys() if k not in ("_id", "user_id", "csrf_token") + k + for k in session.keys() + if k not in ("_fresh", "_id", "_user_id", "csrf_token", "fs_cc", "fs_paa") ]: current_app.logger.info( "Removing %s:%s from session ... " % (skey, session[skey])