fixed issue 1132, unicode in IS_IN_DB validator
This commit is contained in:
@@ -1 +1 @@
|
||||
Version 2.2.1 (2012-11-01 21:01:40) stable
|
||||
Version 2.2.1 (2012-11-01 21:07:42) stable
|
||||
|
||||
+4
-1
@@ -575,7 +575,10 @@ class IS_NOT_IN_DB(Validator):
|
||||
self.record_id = id
|
||||
|
||||
def __call__(self, value):
|
||||
value = str(value)
|
||||
if isinstance(value,unicode):
|
||||
value = value.encode('utf8')
|
||||
else:
|
||||
value = str(value)
|
||||
if not value.strip():
|
||||
return (value, translate(self.error_message))
|
||||
if value in self.allowed_override:
|
||||
|
||||
Reference in New Issue
Block a user