web/views/primary.py
changeset 4072 ead446e70c28
parent 4004 c52619c738a5
child 4074 9cce43f52c61
equal deleted inserted replaced
4071:e19e586cc74e 4072:ead446e70c28
   253 
   253 
   254     def call(self, **kwargs):
   254     def call(self, **kwargs):
   255         # nb: rset retreived using entity.related with limit + 1 if any
   255         # nb: rset retreived using entity.related with limit + 1 if any
   256         # because of that, we known that rset.printable_rql() will return
   256         # because of that, we known that rset.printable_rql() will return
   257         # rql with no limit set anyway (since it's handled manually)
   257         # rql with no limit set anyway (since it's handled manually)
   258         if 'dispctrl' in self.extra_kwargs:
   258         if 'dispctrl' in self.cw_extra_kwargs:
   259             limit = self.extra_kwargs['dispctrl'].get('limit')
   259             limit = self.cw_extra_kwargs['dispctrl'].get('limit')
   260         else:
   260         else:
   261             limit = None
   261             limit = None
   262         if limit is None or self.cw_rset.rowcount <= limit:
   262         if limit is None or self.cw_rset.rowcount <= limit:
   263             if self.cw_rset.rowcount == 1:
   263             if self.cw_rset.rowcount == 1:
   264                 self.wview('incontext', self.cw_rset, row=0)
   264                 self.wview('incontext', self.cw_rset, row=0)