IS_IN_DB cacheable=True

This commit is contained in:
mdipierro
2012-09-17 16:22:30 -05:00
parent e282454bfe
commit 037a200357
2 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -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
View File
@@ -462,12 +462,13 @@ class IS_IN_DB(Validator):
groupby = self.groupby
distinct = self.distinct
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)
else:
orderby = self.orderby or \
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)
self.theset = [str(r[self.kfield]) for r in records]
if isinstance(self.label,str):