فهرست منبع

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('''