From 5766476fa1b42d940ba688ca9ee496f04b3d2201 Mon Sep 17 00:00:00 2001 From: Massimo DiPierro Date: Tue, 5 Jun 2012 10:57:21 -0500 Subject: [PATCH] fixed SQLCustomType represent --- VERSION | 2 +- gluon/dal.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index dcd0c6db..0cba6e9a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.00.0 (2012-06-05 00:02:52) dev +Version 2.00.0 (2012-06-05 10:57:17) dev diff --git a/gluon/dal.py b/gluon/dal.py index 298115b1..ef8494ce 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -1482,7 +1482,10 @@ class BaseAdapter(ConnectionPool): if isinstance(obj, CALLABLETYPES): obj = obj() if isinstance(fieldtype, SQLCustomType): - return fieldtype.encoder(obj) + value = fieldtype.encoder(obj) + if fieldtype.native in ('string','text'): + return self.adapt(value) + return value if isinstance(obj, (Expression, Field)): return str(obj) if fieldtype.startswith('list:'):