~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/registry/browser/peoplemerge.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-07-28 15:33:41 UTC
  • mfrom: (13303.10.38 translations-sharing)
  • Revision ID: launchpad@pqm.canonical.com-20110728153341-9vtzil2t510lrjky
[r=jcsackett][bug=817522] +sharing-details updates all objects at
 once.

Show diffs side-by-side

added added

removed removed

Lines of Context:
139
139
                naked_email.personID = self.target_person.id
140
140
                naked_email.accountID = self.target_person.accountID
141
141
                naked_email.status = EmailAddressStatus.NEW
142
 
        job = getUtility(IPersonSet).mergeAsync(
 
142
        getUtility(IPersonSet).mergeAsync(
143
143
            self.dupe_person, self.target_person, reviewer=self.user)
144
144
        self.request.response.addInfoNotification(self.merge_message)
145
145
        self.next_url = self.success_url
214
214
 
215
215
        super(AdminTeamMergeView, self).validate(data)
216
216
        dupe_team = data['dupe_person']
217
 
        target_team = data['target_person']
218
217
        # We cannot merge the teams if there is a mailing list on the
219
218
        # duplicate person, unless that mailing list is purged.
220
219
        if self.hasMailingList(dupe_team):
342
341
            return ''
343
342
 
344
343
 
345
 
class RequestPeopleMergeMultipleEmailsView:
 
344
class RequestPeopleMergeMultipleEmailsView(LaunchpadView):
346
345
    """Merge request view when dupe account has multiple email addresses."""
347
346
 
348
347
    label = 'Merge Launchpad accounts'
349
348
    page_title = label
350
349
 
351
350
    def __init__(self, context, request):
352
 
        self.context = context
353
 
        self.request = request
 
351
        super(RequestPeopleMergeMultipleEmailsView, self).__init__(
 
352
            context, request)
354
353
        self.form_processed = False
355
354
        self.dupe = None
356
355
        self.notified_addresses = []
357
 
        self.user = getUtility(ILaunchBag).user
358
356
 
359
357
    def processForm(self):
360
358
        dupe = self.request.form.get('dupe')