Appending to the passed_page_view_restrictions list doesn't write it back to the session - need to explicitly write it back to the session dict

This commit is contained in:
Matt Westcott 2014-06-11 13:07:43 +01:00
parent 37519daf7e
commit 37f6ea97b1

View file

@ -49,6 +49,7 @@ def authenticate_with_password(request, page_view_restriction_id, page_id):
passed_restrictions = request.session.setdefault('passed_page_view_restrictions', [])
if restriction.id not in passed_restrictions:
passed_restrictions.append(restriction.id)
request.session['passed_page_view_restrictions'] = passed_restrictions
if not has_existing_session:
# if this is a session we've created, set it to expire at the end
# of the browser session