← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~wallyworld/launchpad/stupid-typos-must-die into lp:launchpad

 

Ian Booth has proposed merging lp:~wallyworld/launchpad/stupid-typos-must-die into lp:launchpad.

Requested reviews:
  Ian Booth (wallyworld)
Related bugs:
  Bug #997343 in Launchpad itself: "Timeout trying to see sharing details page for ~launchpad-security"
  https://bugs.launchpad.net/launchpad/+bug/997343

For more details, see:
https://code.launchpad.net/~wallyworld/launchpad/stupid-typos-must-die/+merge/105920

Clean up some simple errors: A method was called twice and a object method should have been used instead of doing the code by hand. 
-- 
https://code.launchpad.net/~wallyworld/launchpad/stupid-typos-must-die/+merge/105920
Your team Launchpad code reviewers is subscribed to branch lp:launchpad.
=== modified file 'lib/lp/registry/services/sharingservice.py'
--- lib/lp/registry/services/sharingservice.py	2012-05-15 08:16:09 +0000
+++ lib/lp/registry/services/sharingservice.py	2012-05-16 02:40:25 +0000
@@ -76,15 +76,12 @@
         bugtasks = []
         if bug_ids:
             param = BugTaskSearchParams(user=user, bug=any(*bug_ids))
-            if IProduct.providedBy(pillar):
-                param.setProduct(pillar)
-            elif IDistribution.providedBy(pillar):
-                param.setDistribution(pillar)
+            param.setTarget(pillar)
             bugtasks = list(getUtility(IBugTaskSet).search(param))
         # Load the branches.
         branches = []
         if branch_ids:
-            all_branches = getUtility(IAllBranches).visibleByUser(user)
+            all_branches = getUtility(IAllBranches)
             wanted_branches = all_branches.visibleByUser(user).withIds(
                 *branch_ids)
             branches = list(wanted_branches.getBranches())


Follow ups