Skip to content

Commit e05afc1

Browse files
committed
invalid literal fix
1 parent fb491fb commit e05afc1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

secureauth/models.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ def get_google_url(self):
134134
return get_google_url(Sign().unsign(self.code), TOTP_NAME % data)
135135

136136
def _code_is_valid(self, code):
137-
return check_seed(Sign().unsign(self.code), int(code))
137+
if code.isdigit():
138+
return check_seed(Sign().unsign(self.code), int(code))
138139

139140
def make(self):
140141
if not self.code:

0 commit comments

Comments
 (0)