From 41a9f1202418553c25e953ba57b8939b188e71ff Mon Sep 17 00:00:00 2001 From: mdipierro Date: Mon, 1 Apr 2013 14:36:14 -0500 Subject: [PATCH] fixed Issue 1419:Using a recursive select but encountered a broken reference (versioning and auth.signature) --- VERSION | 2 +- gluon/sqlhtml.py | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index a6bdef46..de1d00f3 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.4.5-stable+timestamp.2013.04.01.14.13.58 +Version 2.4.5-stable+timestamp.2013.04.01.14.35.30 diff --git a/gluon/sqlhtml.py b/gluon/sqlhtml.py index 380d9061..9b9dd9e4 100644 --- a/gluon/sqlhtml.py +++ b/gluon/sqlhtml.py @@ -19,6 +19,7 @@ except ImportError: from cgi import parse_qs as psq import os from http import HTTP +from html import XmlComponent from html import XML, SPAN, TAG, A, DIV, CAT, UL, LI, TEXTAREA, BR, IMG, SCRIPT from html import FORM, INPUT, LABEL, OPTION, SELECT, BUTTON from html import TABLE, THEAD, TBODY, TR, TD, TH, STYLE @@ -1229,7 +1230,8 @@ class SQLFORM(FORM): table = TABLE() for id, a, b, c in xfields: newrows = formstyle(id, a, b, c) - self.field_parent[id] = getattr(b, 'parent', None) + self.field_parent[id] = getattr(b, 'parent', None) \ + if isinstance(b,XmlComponent) else None if type(newrows).__name__ != "tuple": newrows = [newrows] for newrow in newrows: @@ -1237,7 +1239,8 @@ class SQLFORM(FORM): else: table = formstyle(self, xfields) for id, a, b, c in xfields: - self.field_parent[id] = getattr(b, 'parent', None) + self.field_parent[id] = getattr(b, 'parent', None) \ + if isinstance(b,XmlComponent) else None else: raise RuntimeError('formstyle not supported') return table