fixed Issue 1419:Using a recursive select but encountered a broken reference (versioning and auth.signature)

This commit is contained in:
mdipierro
2013-04-01 14:36:14 -05:00
parent 669691bbea
commit 41a9f12024
2 changed files with 6 additions and 3 deletions
+1 -1
View File
@@ -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
+5 -2
View File
@@ -19,6 +19,7 @@ except ImportError:
from cgi import parse_qs as psq from cgi import parse_qs as psq
import os import os
from http import HTTP 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 XML, SPAN, TAG, A, DIV, CAT, UL, LI, TEXTAREA, BR, IMG, SCRIPT
from html import FORM, INPUT, LABEL, OPTION, SELECT, BUTTON from html import FORM, INPUT, LABEL, OPTION, SELECT, BUTTON
from html import TABLE, THEAD, TBODY, TR, TD, TH, STYLE from html import TABLE, THEAD, TBODY, TR, TD, TH, STYLE
@@ -1229,7 +1230,8 @@ class SQLFORM(FORM):
table = TABLE() table = TABLE()
for id, a, b, c in xfields: for id, a, b, c in xfields:
newrows = formstyle(id, a, b, c) 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": if type(newrows).__name__ != "tuple":
newrows = [newrows] newrows = [newrows]
for newrow in newrows: for newrow in newrows:
@@ -1237,7 +1239,8 @@ class SQLFORM(FORM):
else: else:
table = formstyle(self, xfields) table = formstyle(self, xfields)
for id, a, b, c in 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: else:
raise RuntimeError('formstyle not supported') raise RuntimeError('formstyle not supported')
return table return table