From a01cc89ff2824afb5eb140b6d9207896903c541c Mon Sep 17 00:00:00 2001 From: Massimo Di Pierro Date: Fri, 16 Dec 2011 11:57:29 -0600 Subject: [PATCH] fixed decimal bug in sqlform, thanks Anthony --- VERSION | 2 +- gluon/sqlhtml.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/VERSION b/VERSION index 4c6442d1..e67dddc0 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 1.99.4 (2011-12-16 11:55:10) stable +Version 1.99.4 (2011-12-16 11:57:23) stable diff --git a/gluon/sqlhtml.py b/gluon/sqlhtml.py index 92490d0d..c7d91c97 100644 --- a/gluon/sqlhtml.py +++ b/gluon/sqlhtml.py @@ -876,10 +876,10 @@ class SQLFORM(FORM): dspval = '' elif field.type == 'blob': continue - elif field.type in self.widgets: - inp = self.widgets[field.type].widget(field, default) else: - inp = self.widgets.string.widget(field, default) + field_type = widget_class.match(str(field.type)).group() + field_type = field_type in self.widgets and field_type or 'string' + inp = self.widgets[field_type].widget(field, default) xfields.append((row_id,label,inp,comment)) self.custom.dspval[fieldname] = dspval or nbsp