瀏覽代碼

Allow bank login while debugging

Eren Yilmaz 6 年之前
父節點
當前提交
ac5a6692c2
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. 4 2
      model.py

+ 4 - 2
model.py

@@ -86,8 +86,10 @@ def used_key_count():
 def login(username, password):
     connect()
 
-    # do not allow login as bank
-    if password == '':
+    # do not allow login as bank or with empty password
+    if username == 'bank' and not debug:
+        return None
+    if password == '' and not debug:
         return None
 
     cursor.execute('''