fixed LazyCrypt, thanks Denes
This commit is contained in:
@@ -2847,9 +2847,11 @@ class CRYPT(object):
|
||||
self.salt = salt
|
||||
|
||||
def __call__(self, value):
|
||||
value = value and value[:self.max_length]
|
||||
if len(value) < self.min_length:
|
||||
v = v and str(v)[:self.max_length]
|
||||
if not v or len(v) < self.min_length:
|
||||
return ('', translate(self.error_message))
|
||||
if isinstance(value, LazyCrypt):
|
||||
return (value, None)
|
||||
return (LazyCrypt(self, value), None)
|
||||
|
||||
# entropy calculator for IS_STRONG
|
||||
|
||||
Reference in New Issue
Block a user