~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/bugs/model/bug.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-04-26 16:49:30 UTC
  • mfrom: (12915.3.4 bug-770248)
  • Revision ID: launchpad@pqm.canonical.com-20110426164930-cylgcxzcbmz574eb
[r=gmb][bug=770248] Show mute link on a bug page if a person is in a
        team with a structural subscription.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1894
1894
        # and assignees. As such, it's not possible to get them all with
1895
1895
        # one query.
1896
1896
        also_notified_subscribers = self.getAlsoNotifiedSubscribers()
1897
 
 
1898
 
        return person in also_notified_subscribers
 
1897
        if person in also_notified_subscribers:
 
1898
            return True
 
1899
        # Otherwise check to see if the person is a member of any of the
 
1900
        # subscribed teams.
 
1901
        for subscriber in also_notified_subscribers:
 
1902
            if subscriber.is_team and person.inTeam(subscriber):
 
1903
                return True
 
1904
        return False
1899
1905
 
1900
1906
    def personIsSubscribedToDuplicate(self, person):
1901
1907
        """See `IBug`."""