~launchpad-pqm/launchpad/devel

« back to all changes in this revision

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

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-05-09 22:53:33 UTC
  • mfrom: (12959.4.23 anwers-api-0)
  • Revision ID: launchpad@pqm.canonical.com-20110509225333-lu5q3l2zce8erpbx
[r=benji][bug=780078] Export answer contact management over the API.

Show diffs side-by-side

added added

removed removed

Lines of Context:
141
141
    def getAnswerContactsForLanguage(self, language):
142
142
        """See `IQuestionTarget`."""
143
143
        # Sourcepackages are supported by their distribtions too.
144
 
        persons = self.distribution.getAnswerContactsForLanguage(language)
145
 
        persons.update(QuestionTargetMixin.getAnswerContactsForLanguage(
146
 
            self, language))
 
144
        persons = set(
 
145
            self.distribution.getAnswerContactsForLanguage(language))
 
146
        persons.update(
 
147
            set(QuestionTargetMixin.getAnswerContactsForLanguage(
 
148
            self, language)))
147
149
        return sorted(
148
150
            [person for person in persons], key=attrgetter('displayname'))
149
151