From 540fd2a79d1fd43590a5221734b309cce51fae51 Mon Sep 17 00:00:00 2001 From: helmutm Date: Tue, 27 Oct 2009 10:07:30 +0000 Subject: [PATCH] handle non-string values correctly git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@3607 fd906abe-77d9-0310-91a1-e0d9ade77398 --- composer/schema/grid/field.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/composer/schema/grid/field.py b/composer/schema/grid/field.py index b972655..83c57ea 100644 --- a/composer/schema/grid/field.py +++ b/composer/schema/grid/field.py @@ -126,7 +126,10 @@ class RecordsFieldInstance(GridFieldInstance): item = {} empty = True for fi in self.columnFieldInstances: - value = fi.unmarshall(row[fi.name].strip()) + value = row[fi.name] + if isinstance(value, basestring): + value = value.strip() + value = fi.unmarshall(value) item[fi.name] = value if fi.default is not None: if value and value != fi.default: