Mochi0622 commited on
Commit
ea68c55
·
verified ·
1 Parent(s): 7fe811b

Update student_login.py

Browse files
Files changed (1) hide show
  1. student_login.py +7 -5
student_login.py CHANGED
@@ -101,12 +101,14 @@ def logout_student(n_clicks):
101
  clientside_callback(
102
  """
103
  function(storeData) {
104
- // storeData 是 dcc.Store 讀到的值
105
- // 有學號 不開 modal;沒學號 開 modal
106
- if (storeData && storeData !== "") {
107
- return false;
 
 
 
108
  }
109
- return true;
110
  }
111
  """,
112
  Output("student-login-modal", "opened"),
 
101
  clientside_callback(
102
  """
103
  function(storeData) {
104
+ try {
105
+ if (storeData && storeData !== "") {
106
+ return false;
107
+ }
108
+ return true;
109
+ } catch(e) {
110
+ return true;
111
  }
 
112
  }
113
  """,
114
  Output("student-login-modal", "opened"),