lazy sqlhtml_validators, fixed issue 931
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 2.3.0 (2012-12-05 13:52:46) rc1
|
Version 2.3.0 (2012-12-05 14:17:12) rc1
|
||||||
|
|||||||
+3
-2
@@ -7205,6 +7205,9 @@ def index():
|
|||||||
self[tablename] = table
|
self[tablename] = table
|
||||||
# must follow above line to handle self references
|
# must follow above line to handle self references
|
||||||
table._create_references()
|
table._create_references()
|
||||||
|
for field in table:
|
||||||
|
if field.requires == DEFAULT:
|
||||||
|
field.requires = sqlhtml_validators(field)
|
||||||
|
|
||||||
migrate = self._migrate_enabled and args_get('migrate',self._migrate)
|
migrate = self._migrate_enabled and args_get('migrate',self._migrate)
|
||||||
if migrate and not self._uri in (None,'None') \
|
if migrate and not self._uri in (None,'None') \
|
||||||
@@ -7623,8 +7626,6 @@ class Table(object):
|
|||||||
if db and not field.type in ('text','blob') and \
|
if db and not field.type in ('text','blob') and \
|
||||||
db._adapter.maxcharlength < field.length:
|
db._adapter.maxcharlength < field.length:
|
||||||
field.length = db._adapter.maxcharlength
|
field.length = db._adapter.maxcharlength
|
||||||
if field.requires == DEFAULT:
|
|
||||||
field.requires = sqlhtml_validators(field)
|
|
||||||
self.ALL = SQLALL(self)
|
self.ALL = SQLALL(self)
|
||||||
|
|
||||||
if hasattr(self,'_primarykey'):
|
if hasattr(self,'_primarykey'):
|
||||||
|
|||||||
Reference in New Issue
Block a user