Merge pull request #1967 from misl6/master

Fixes login_bare + register_bare w/ custom login_userfield
This commit is contained in:
mdipierro
2018-08-05 17:19:34 -07:00
committed by GitHub
3 changed files with 14 additions and 11 deletions
+3 -2
View File
@@ -103,17 +103,18 @@ class CacheRepresenter(object):
cache[field][value] = nvalue
return nvalue
def safe_int(x, i=0):
try:
return int(x)
except ValueError:
except (ValueError, TypeError):
return i
def safe_float(x):
try:
return float(x)
except ValueError:
except (ValueError, TypeError):
return 0