summaryrefslogtreecommitdiff
path: root/src/mailman/app/subscriptions.py
diff options
context:
space:
mode:
authorAurélien Bompard2016-09-05 20:35:55 +0200
committerAurélien Bompard2016-11-21 18:53:44 +0100
commit30be8bfca274d69ced55e9fdadc8dbff379bf5ab (patch)
treec108ea8f3afaeff51925cd8fdbb49c34c3d57bd6 /src/mailman/app/subscriptions.py
parentf516c2bcb2b44aa8e1180a334e055a873af249da (diff)
downloadmailman-30be8bfca274d69ced55e9fdadc8dbff379bf5ab.tar.gz
mailman-30be8bfca274d69ced55e9fdadc8dbff379bf5ab.tar.zst
mailman-30be8bfca274d69ced55e9fdadc8dbff379bf5ab.zip
Handle a missing user when a workflow is restored.
Between the creation of a subscription workflow and its approval, the user may have been merged with another user. In this case, use the associated address to find the new user.
Diffstat (limited to 'src/mailman/app/subscriptions.py')
-rw-r--r--src/mailman/app/subscriptions.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mailman/app/subscriptions.py b/src/mailman/app/subscriptions.py
index 9e8d8dd9d..f88a967c2 100644
--- a/src/mailman/app/subscriptions.py
+++ b/src/mailman/app/subscriptions.py
@@ -102,7 +102,8 @@ class _SubscriptionWorkflowCommon(Workflow):
# For restore.
uid = uuid.UUID(hex_key)
self.user = getUtility(IUserManager).get_user_by_id(uid)
- assert self.user is not None
+ if self.user is None:
+ self.user = self.address.user
@property
def address_key(self):