fixed backward compatibility issue formstyles, thanks Dominic
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 2.00.0 (2012-08-21 07:57:05) dev
|
Version 2.00.0 (2012-08-21 08:52:02) dev
|
||||||
|
|||||||
@@ -1379,6 +1379,7 @@ def errors():
|
|||||||
|
|
||||||
return dict(errors = [x[1] for x in decorated], app=app, method=method, db_ready=db_ready)
|
return dict(errors = [x[1] for x in decorated], app=app, method=method, db_ready=db_ready)
|
||||||
|
|
||||||
|
|
||||||
elif method == 'dbnew':
|
elif method == 'dbnew':
|
||||||
errors_path = apath('%s/errors' % app, r=request)
|
errors_path = apath('%s/errors' % app, r=request)
|
||||||
tk_db, tk_table = get_ticket_storage(app)
|
tk_db, tk_table = get_ticket_storage(app)
|
||||||
|
|||||||
+2
-1
@@ -1086,7 +1086,8 @@ class SQLFORM(FORM):
|
|||||||
|
|
||||||
if callable(self.formstyle):
|
if callable(self.formstyle):
|
||||||
# backward compatibility, 4 argument function is the old style
|
# backward compatibility, 4 argument function is the old style
|
||||||
if len(inspect.getargspec(self.formstyle)[0]) == 4:
|
args, varargs, keywords, defaults = inspect.getargspec(self.formstyle)
|
||||||
|
if defaults and len(args) - len(defaults) == 4 or len(args) == 4:
|
||||||
table = TABLE()
|
table = TABLE()
|
||||||
for id,a,b,c in xfields:
|
for id,a,b,c in xfields:
|
||||||
raw_b = self.field_parent[id] = b
|
raw_b = self.field_parent[id] = b
|
||||||
|
|||||||
Reference in New Issue
Block a user