← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~cjwatson/launchpad/close-account-message-owner into lp:launchpad

 

Colin Watson has proposed merging lp:~cjwatson/launchpad/close-account-message-owner into lp:launchpad.

Commit message:
Skip Message.owner references in close-account.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/close-account-message-owner/+merge/360056

These are created if (e.g.) the user had commented on a question at some point.  There's no need to break those links.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/close-account-message-owner into lp:launchpad.
=== modified file 'lib/lp/registry/scripts/closeaccount.py'
--- lib/lp/registry/scripts/closeaccount.py	2018-12-03 11:34:32 +0000
+++ lib/lp/registry/scripts/closeaccount.py	2018-12-04 13:15:36 +0000
@@ -100,6 +100,7 @@
         ('gitrule', 'creator'),
         ('gitrulegrant', 'grantor'),
         ('gitsubscription', 'subscribed_by'),
+        ('message', 'owner'),
         ('messageapproval', 'disposed_by'),
         ('messageapproval', 'posted_by'),
         ('packagecopyrequest', 'requester'),

=== modified file 'lib/lp/registry/scripts/tests/test_closeaccount.py'
--- lib/lp/registry/scripts/tests/test_closeaccount.py	2018-11-29 18:44:25 +0000
+++ lib/lp/registry/scripts/tests/test_closeaccount.py	2018-12-04 13:15:36 +0000
@@ -206,6 +206,7 @@
                 QuestionStatus.OPEN, QuestionStatus.NEEDSINFO,
                 QuestionStatus.ANSWERED):
             question = self.factory.makeQuestion(owner=person)
+            question.addComment(person, "comment")
             removeSecurityProxy(question).status = status
             questions.append(question)
         script = self.makeScript([nativeString(person.name)])
@@ -227,6 +228,7 @@
                 QuestionStatus.SOLVED, QuestionStatus.EXPIRED,
                 QuestionStatus.INVALID):
             question = self.factory.makeQuestion(owner=person)
+            question.addComment(person, "comment")
             removeSecurityProxy(question).status = status
             questions[status] = question
         script = self.makeScript([nativeString(person.name)])


Follow ups