equal
deleted
inserted
replaced
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) |