diff --git a/VERSION b/VERSION index cdeb49fc..37e3af06 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 1.99.4 (2012-01-16 21:46:16) stable +Version 1.99.4 (2012-01-16 21:51:43) stable diff --git a/gluon/dal.py b/gluon/dal.py index e35adff9..23266af4 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -1461,12 +1461,12 @@ class BaseAdapter(ConnectionPool): pass if isinstance(value, unicode): value = value.encode('utf-8') - if isinstance(field_type, SQLCustomType): + elif isinstance(field_type, SQLCustomType): value = field_type.decoder(value) - elif not isinstance(field_type, str) or value is None: - return value - if field_type in ('string', 'text', 'password', 'upload'): + if not isinstance(field_type, str) or value is None: return value + elif field_type in ('string', 'text', 'password', 'upload'): + return value else: key = regex_type.match(field_type).group(0) return self.parsemap[key](value,field_type)