delete team IntegrityError: emailaddress__person__key

Bug #610850 reported by Curtis Hovey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Unassigned

Bug Description

OOPS-1669EB4270 shows that the merge into ~registry failed.

The team did have an email address and I set the team to send to all members (implcitly deleting the email address). I then used the delete action to merge the team with ~registry

 I expect the delete team rules to delete team email addresses as the first step of the merge.

Related branches

Curtis Hovey (sinzui)
tags: added: merge-deactivate
Curtis Hovey (sinzui)
Changed in launchpad-registry:
milestone: 10.08 → 10.09
Revision history for this message
Curtis Hovey (sinzui) wrote :

The rules were not complete in the implementation. Adding a test for the email address of the merge team showed that it was transferred to ~registry. The fix is simple: call person.setContactAddress() /before/ doMerge() in DeleteTeamView.

Changed in launchpad-registry:
assignee: nobody → Curtis Hovey (sinzui)
status: Triaged → In Progress
Curtis Hovey (sinzui)
Changed in launchpad-registry:
status: In Progress → Fix Committed
Revision history for this message
Launchpad QA Bot (lpqabot) wrote : Bug fixed by a commit
tags: added: qa-needstesting
Curtis Hovey (sinzui)
tags: added: qa-bad
removed: qa-needstesting
Revision history for this message
Curtis Hovey (sinzui) wrote :

OOPS-1689EC2137 shows there is a new kind of oops:

  Module lp.registry.browser.peoplemerge, line 326, in merge_action
    self.context.setContactAddress(None)
  Module lp.registry.model.person, line 2052, in setContactAddress
    mailing_list_email = IMasterObject(mailing_list_email)
  Module zope.site.hooks, line 95, in adapter_hook
    return siteinfo.adapter_hook(interface, object, name, default)
  Module zope.security.adapter, line 88, in __call__
    adapter = self.factory(*args)
  Module canonical.launchpad.webapp.adapter, line 606, in get_object_from_master_store
    master_store = IMasterStore(obj)
TypeError: ('Could not adapt', None, <InterfaceClass canonical.launchpad.interfaces.lpstorm.IMasterStore>

The team had an mailing list. It was mark purged an hour before. I am surprised by this error:

        if self.mailing_list is not None:
            mailing_list_email = getUtility(IEmailAddressSet).getByEmail(
                self.mailing_list.address)
            mailing_list_email = IMasterObject(mailing_list_email)

I think the code may need to check if the mailing_list is purged to ensure it has an email address:
    if self.mailing_list is not None and self.mailing_list.status is not MailingListStatus.PURGED:

Revision history for this message
Curtis Hovey (sinzui) wrote :

We will know this issue is fixed when we can delete https://launchpad.net/~ubuntu-l10n-nds

Curtis Hovey (sinzui)
Changed in launchpad-registry:
status: Fix Committed → Fix Released
Curtis Hovey (sinzui)
Changed in launchpad:
assignee: Curtis Hovey (sinzui) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.