~sahana-eden-short-projects/sahana-eden/staging

« back to all changes in this revision

Viewing changes to modules/s3/s3validators.py

  • Committer: Fran Boon
  • Date: 2011-10-11 13:55:26 UTC
  • Revision ID: fran@aidiq.com-20111011135526-lyh2t9zav7k6f9dk
Don't cache options() as otherwise Colorbox 'Add XXX' can't refresh the dropdown reliably

Show diffs side-by-side

added added

removed removed

Lines of Context:
301
301
            if db._dbname not in ("gql", "gae"):
302
302
                orderby = self.orderby or reduce(lambda a, b: a|b, fields)
303
303
                groupby = self.groupby
304
 
                dd = dict(orderby=orderby, groupby=groupby, cache=(current.cache.ram, 60))
 
304
                # Caching breaks Colorbox dropdown refreshes
 
305
                #dd = dict(orderby=orderby, groupby=groupby, cache=(current.cache.ram, 60))
 
306
                dd = dict(orderby=orderby, groupby=groupby)
305
307
                query = auth.s3_accessible_query("read", table)
306
308
                if "deleted" in table:
307
309
                    query = ((table["deleted"] == False) & query)
320
322
                orderby = self.orderby or \
321
323
                          reduce(lambda a, b: a|b, (f for f in fields
322
324
                                                    if not f.name == "id"))
323
 
                dd = dict(orderby=orderby, cache=(current.cache.ram, 60))
 
325
                #dd = dict(orderby=orderby, cache=(current.cache.ram, 60))
 
326
                dd = dict(orderby=orderby)
324
327
                records = dbset.select(db[self.ktable].ALL, **dd)
325
328
            self.theset = [str(r[self.kfield]) for r in records]
326
329
            #labels = []