handle non-string values correctly

git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@3607 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
helmutm 2009-10-27 10:07:30 +00:00
parent 47bb6fd666
commit 540fd2a79d

View file

@ -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: