ml-visoft commited on
Commit
7e31458
1 Parent(s): 0f29012

wrong session_data bug

Browse files
Files changed (1) hide show
  1. main.py +1 -1
main.py CHANGED
@@ -897,7 +897,7 @@ def get_user_level(session):
897
  :return:
898
  """
899
  ulevel = 0
900
- if session[USER_DATA_SESSION_NAME] is not None:
901
  ulevel = 2
902
  ulevel = max(ulevel, DEFAULT_ANONYMOUS_USER_LEVEL)
903
 
 
897
  :return:
898
  """
899
  ulevel = 0
900
+ if session.get(USER_DATA_SESSION_NAME, None) is not None:
901
  ulevel = 2
902
  ulevel = max(ulevel, DEFAULT_ANONYMOUS_USER_LEVEL)
903