From 2a038a067951c2086c4054a8fdcf0fdbb9a4f080 Mon Sep 17 00:00:00 2001 From: Massimo Di Pierro Date: Mon, 16 Jan 2012 21:51:50 -0600 Subject: [PATCH] possibly fixed issue 614? --- VERSION | 2 +- gluon/dal.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) 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)