updated web.py to make session permanent (#547)

* moved making session permanent to after authentication in web.py

Co-authored-by: Charlie Rose <charlierose@Charlies-MacBook-Pro.local>
This commit is contained in:
Charles Rose 2020-04-07 11:09:33 -04:00 committed by GitHub
parent 23b7e397f2
commit 4b79efe18a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -235,6 +235,8 @@ def authenticate(project_id=None):
# add the project on the top of the list # add the project on the top of the list
session["projects"].insert(0, (project_id, project.name)) session["projects"].insert(0, (project_id, project.name))
session[project_id] = True session[project_id] = True
# Set session to permanent to make language choice persist
session.permanent = True
session.update() session.update()
setattr(g, "project", project) setattr(g, "project", project)
return redirect(url_for(".list_bills")) return redirect(url_for(".list_bills"))