forked from crunk/distribusi-verse
small fix to reset user state: current distribusi
This commit is contained in:
parent
c2eb48590e
commit
dc16cdc768
@ -73,6 +73,8 @@ def DistribusiSelected():
|
||||
def ResetUserState():
|
||||
"""reset user state upon visiting index, so that distribusi workflow can
|
||||
be done correctly"""
|
||||
if not current_user.is_authenticated:
|
||||
return
|
||||
try:
|
||||
user = User.query.filter_by(email=current_user.email).first()
|
||||
user.currentdistribusi = None
|
||||
@ -83,6 +85,8 @@ def ResetUserState():
|
||||
|
||||
|
||||
def SelectCurrentDistribusi(distribusiname):
|
||||
if not current_user.is_authenticated:
|
||||
return
|
||||
user = User.query.filter_by(email=current_user.email).first()
|
||||
try:
|
||||
user.currentdistribusi = distribusiname
|
||||
|
Loading…
Reference in New Issue
Block a user