← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~michael.nelson/launchpad/598464-qa-fix into lp:launchpad/devel

 

Michael Nelson has proposed merging lp:~michael.nelson/launchpad/598464-qa-fix into lp:launchpad/devel.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  #598464 get or create lpuser via api
  https://bugs.launchpad.net/bugs/598464


Overview
========
This branch ensures that after a new person is created using the master db policy, the lookup for that person is done also within the master db policy.

It is responsible for bug 598464 (OOPS-1663S295). There is a separate bug about the vagueness of the raised error (bug 607476).

Details
=======
It's a one-line change ;)

Test
====
You can ensure all the related tests still pass with:

$ bin/test -vv -m test_personset

Testing this specific change could be tricky. I chatted with Gary about it and we couldn't think of a proper way to test slave/master related issues easily without a hack. In the past for a different issue I've chatted with stub about the possibility, and he seemed to think it's not possible to test directly (as the slave/master policies are for the same connection on a dev server).
-- 
https://code.launchpad.net/~michael.nelson/launchpad/598464-qa-fix/+merge/30545
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~michael.nelson/launchpad/598464-qa-fix into lp:launchpad/devel.
=== modified file 'lib/lp/registry/model/person.py'
--- lib/lp/registry/model/person.py	2010-07-19 15:32:21 +0000
+++ lib/lp/registry/model/person.py	2010-07-21 15:17:53 +0000
@@ -2502,7 +2502,7 @@
                     creation_rationale, comment=comment)
                 db_updated = True
 
-        return IPerson(account), db_updated
+            return IPerson(account), db_updated
 
     def newTeam(self, teamowner, name, displayname, teamdescription=None,
                 subscriptionpolicy=TeamSubscriptionPolicy.MODERATED,