~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/bugs/browser/bugtask.py

[r=adeuring,
 jcsackett][bug=901124] Ensure there is only one instance of batch
 navigator in new bug listings.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2555
2555
    custom_widget('structural_subscriber', PersonPickerWidget)
2556
2556
    custom_widget('subscriber', PersonPickerWidget)
2557
2557
 
 
2558
    _batch_navigator = None
 
2559
 
2558
2560
    @cachedproperty
2559
2561
    def bug_tracking_usage(self):
2560
2562
        """Whether the context tracks bugs in Launchpad.
3019
3021
            the search criteria taken from the request. Params in
3020
3022
            `extra_params` take precedence over request params.
3021
3023
        """
3022
 
        unbatchedTasks = self.searchUnbatched(
3023
 
            searchtext, context, extra_params)
3024
 
        return self._getBatchNavigator(unbatchedTasks)
 
3024
        if self._batch_navigator is None:
 
3025
            unbatchedTasks = self.searchUnbatched(
 
3026
                searchtext, context, extra_params)
 
3027
            self._batch_navigator = self._getBatchNavigator(unbatchedTasks)
 
3028
        return self._batch_navigator
3025
3029
 
3026
3030
    def searchUnbatched(self, searchtext=None, context=None,
3027
3031
                        extra_params=None, prejoins=[]):