~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/registry/model/pillaraffiliation.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-09-27 02:14:31 UTC
  • mfrom: (14033.3.1 branch-affiliation)
  • Revision ID: launchpad@pqm.canonical.com-20110927021431-al6n30epo16l5nuc
[r=benji][bug=857697] Personal branches do not have project
        affiliation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
193
193
    """An affiliation adapter for branches."""
194
194
 
195
195
    def getPillars(self):
196
 
        return [self.context.product or self.context.distribution]
 
196
        pillar = self.context.product or self.context.distribution
 
197
        if pillar is None:
 
198
            # This is a +junk branch.
 
199
            return []
 
200
        return [pillar]
197
201
 
198
202
    def getBranch(self):
199
203
        return self.context