Ver Fonte

Allow bank login while debugging

Eren Yilmaz há 6 anos atrás
pai
commit
ac5a6692c2
1 ficheiros alterados com 4 adições e 2 exclusões
  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('''