From bd27df8fa56f7a21fc21d29ef930f34ce2958283 Mon Sep 17 00:00:00 2001 From: Massimo Date: Fri, 28 Sep 2012 12:47:36 -0500 Subject: [PATCH] fixed issue 1042, thanks Dominic --- VERSION | 2 +- gluon/sqlhtml.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 23d4be4f..cfa2190e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.0.9 (2012-09-28 12:37:56) dev +Version 2.0.9 (2012-09-28 12:47:32) dev diff --git a/gluon/sqlhtml.py b/gluon/sqlhtml.py index 7589d09e..2868f462 100644 --- a/gluon/sqlhtml.py +++ b/gluon/sqlhtml.py @@ -1142,7 +1142,7 @@ class SQLFORM(FORM): table = TABLE() for id,a,b,c in xfields: newrows = formstyle(id,a,b,c) - self.field_parent[id] = b.parent + self.field_parent[id] = getattr(b,'parent',None) if type(newrows).__name__ != "tuple": newrows = [newrows] for newrow in newrows: