web/views/primary.py
changeset 4074 9cce43f52c61
parent 4073 03681ba6da0b
parent 4072 ead446e70c28
child 4104 7e478d7caf20
equal deleted inserted replaced
4073:03681ba6da0b 4074:9cce43f52c61
   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.cw_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)