From b8db38cf9827b5903392e577545d44aa65d73c83 Mon Sep 17 00:00:00 2001 From: Helmut Merz Date: Sun, 8 Jul 2012 18:46:49 +0200 Subject: [PATCH] tolerate missing input items when filling grid --- composer/schema/grid/field.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer/schema/grid/field.py b/composer/schema/grid/field.py index 9c93d7a..dd69c90 100644 --- a/composer/schema/grid/field.py +++ b/composer/schema/grid/field.py @@ -114,7 +114,7 @@ class GridFieldInstance(ListFieldInstance): def unmarshallRow(self, row): item = {} for fi in self.columnFieldInstances: - value = fi.unmarshall(row[fi.name]) + value = fi.unmarshall(row.get(fi.name) or u'') if isinstance(value, basestring): value = value.strip() if fi.default is not None: