~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/registry/browser/distroseries.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-08-16 19:34:28 UTC
  • mfrom: (13697.3.2 more-820456)
  • Revision ID: launchpad@pqm.canonical.com-20110816193428-22c8cn0svm1w17qi
[r=gmb][bug=820456] Never hide the search box on +localpackagediffs.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1117
1117
 
1118
1118
        return BatchNavigator(differences, self.request)
1119
1119
 
1120
 
    @cachedproperty
1121
 
    def has_differences(self):
1122
 
        """Whether or not differences between this derived series and
1123
 
        its parent exist.
1124
 
        """
1125
 
        # Performance optimisation: save a query if we have differences
1126
 
        # to show in the batch.
1127
 
        if self.cached_differences.batch.total() > 0:
1128
 
            return True
1129
 
        else:
1130
 
            # Here we check the whole dataset since the empty batch
1131
 
            # might be filtered.
1132
 
            differences = getUtility(
1133
 
                IDistroSeriesDifferenceSource).getForDistroSeries(
1134
 
                    self.context,
1135
 
                    difference_type=self.differences_type,
1136
 
                    status=(
1137
 
                        DistroSeriesDifferenceStatus.NEEDS_ATTENTION,
1138
 
                        DistroSeriesDifferenceStatus.BLACKLISTED_CURRENT))
1139
 
            return not differences.is_empty()
1140
 
 
1141
1120
    def parent_changelog_url(self, distroseriesdifference):
1142
1121
        """The URL to the /parent/series/+source/package/+changelog """
1143
1122
        distro = distroseriesdifference.parent_series.distribution