← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~cjwatson/launchpad/root-public-blueprint-count into lp:launchpad

 

Colin Watson has proposed merging lp:~cjwatson/launchpad/root-public-blueprint-count into lp:launchpad.

Commit message:
Restrict blueprint count on front page to public blueprints.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/root-public-blueprint-count/+merge/322563

This should be a fair bit faster, particularly for users in interesting teams for whom the front page currently times out.  There's no particular use in trying to be pedantically accurate with the numbers on the front page, and we take the same public-only approach for Bazaar branches and Git repositories.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/root-public-blueprint-count into lp:launchpad.
=== modified file 'lib/lp/app/browser/root.py'
--- lib/lp/app/browser/root.py	2016-04-19 14:23:22 +0000
+++ lib/lp/app/browser/root.py	2017-04-13 23:25:20 +0000
@@ -138,7 +138,7 @@
     @property
     def blueprint_count(self):
         """The total blueprint count in all of Launchpad."""
-        return getUtility(ISpecificationSet).specificationCount(self.user)
+        return getUtility(ISpecificationSet).specificationCount(None)
 
     @property
     def answer_count(self):


Follow ups