← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~cjwatson/launchpad/launchbag-projectgroup into lp:launchpad

 

Colin Watson has proposed merging lp:~cjwatson/launchpad/launchbag-projectgroup into lp:launchpad.

Commit message:
Rename ILaunchBag.project to ILaunchBag.projectgroup.

Requested reviews:
  Colin Watson (cjwatson)
Related bugs:
  Bug #523054 in Launchpad itself: "Rename Product.project to Product.projectgroup"
  https://bugs.launchpad.net/launchpad/+bug/523054

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/launchbag-projectgroup/+merge/247979

Rename ILaunchBag.project to ILaunchBag.projectgroup.
-- 
Your team Launchpad code reviewers is subscribed to branch lp:launchpad.
=== modified file 'lib/lp/services/webapp/interfaces.py'
--- lib/lp/services/webapp/interfaces.py	2014-11-28 22:07:05 +0000
+++ lib/lp/services/webapp/interfaces.py	2015-01-29 13:32:22 +0000
@@ -282,7 +282,7 @@
 # implementation into two parts, having a different name for the webapp/ bits.
 class ILaunchBag(Interface):
     person = Attribute('IPerson, or None')
-    project = Attribute('IProjectGroup, or None')
+    projectgroup = Attribute('IProjectGroup, or None')
     product = Attribute('IProduct, or None')
     distribution = Attribute('IDistribution, or None')
     distroseries = Attribute('IDistroSeries, or None')

=== modified file 'lib/lp/services/webapp/launchbag.py'
--- lib/lp/services/webapp/launchbag.py	2013-05-22 03:00:34 +0000
+++ lib/lp/services/webapp/launchbag.py	2015-01-29 13:32:22 +0000
@@ -28,7 +28,6 @@
 from lp.services.identity.interfaces.account import IAccount
 from lp.services.webapp.interaction import get_current_principal
 from lp.services.webapp.interfaces import (
-    ILaunchBag,
     ILoggedInEvent,
     IOpenLaunchBag,
     )
@@ -45,7 +44,7 @@
     # Map Interface to attribute name.
     _registry = {
         IPerson: 'person',
-        IProjectGroup: 'project',
+        IProjectGroup: 'projectgroup',
         IProduct: 'product',
         IDistribution: 'distribution',
         IDistroSeries: 'distroseries',
@@ -102,12 +101,12 @@
         return self._store.person
 
     @property
-    def project(self):
+    def projectgroup(self):
         store = self._store
-        if store.project is not None:
-            return store.project
+        if store.projectgroup is not None:
+            return store.projectgroup
         elif store.product is not None:
-            return store.product.project
+            return store.product.projectgroup
         else:
             return None
 


References