|
@ -73,6 +73,8 @@ def DistribusiSelected(): |
|
|
def ResetUserState(): |
|
|
def ResetUserState(): |
|
|
"""reset user state upon visiting index, so that distribusi workflow can |
|
|
"""reset user state upon visiting index, so that distribusi workflow can |
|
|
be done correctly""" |
|
|
be done correctly""" |
|
|
|
|
|
if not current_user.is_authenticated: |
|
|
|
|
|
return |
|
|
try: |
|
|
try: |
|
|
user = User.query.filter_by(email=current_user.email).first() |
|
|
user = User.query.filter_by(email=current_user.email).first() |
|
|
user.currentdistribusi = None |
|
|
user.currentdistribusi = None |
|
@ -83,6 +85,8 @@ def ResetUserState(): |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def SelectCurrentDistribusi(distribusiname): |
|
|
def SelectCurrentDistribusi(distribusiname): |
|
|
|
|
|
if not current_user.is_authenticated: |
|
|
|
|
|
return |
|
|
user = User.query.filter_by(email=current_user.email).first() |
|
|
user = User.query.filter_by(email=current_user.email).first() |
|
|
try: |
|
|
try: |
|
|
user.currentdistribusi = distribusiname |
|
|
user.currentdistribusi = distribusiname |
|
|