IS_IN_DB cacheable=True
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 2.0.9 (2012-09-17 14:23:09) stable
|
Version 2.0.9 (2012-09-17 16:22:24) stable
|
||||||
|
|||||||
+3
-2
@@ -462,12 +462,13 @@ class IS_IN_DB(Validator):
|
|||||||
groupby = self.groupby
|
groupby = self.groupby
|
||||||
distinct = self.distinct
|
distinct = self.distinct
|
||||||
dd = dict(orderby=orderby, groupby=groupby,
|
dd = dict(orderby=orderby, groupby=groupby,
|
||||||
distinct=distinct, cache=self.cache)
|
distinct=distinct, cache=self.cache,
|
||||||
|
cacheable=True)
|
||||||
records = self.dbset(table).select(*fields, **dd)
|
records = self.dbset(table).select(*fields, **dd)
|
||||||
else:
|
else:
|
||||||
orderby = self.orderby or \
|
orderby = self.orderby or \
|
||||||
reduce(lambda a,b:a|b,(f for f in fields if not f.name=='id'))
|
reduce(lambda a,b:a|b,(f for f in fields if not f.name=='id'))
|
||||||
dd = dict(orderby=orderby, cache=self.cache)
|
dd = dict(orderby=orderby, cache=self.cache, cacheable=True)
|
||||||
records = self.dbset(table).select(table.ALL, **dd)
|
records = self.dbset(table).select(table.ALL, **dd)
|
||||||
self.theset = [str(r[self.kfield]) for r in records]
|
self.theset = [str(r[self.kfield]) for r in records]
|
||||||
if isinstance(self.label,str):
|
if isinstance(self.label,str):
|
||||||
|
|||||||
Reference in New Issue
Block a user