diff options
| author | Barry Warsaw | 2016-11-24 16:07:55 +0000 |
|---|---|---|
| committer | Barry Warsaw | 2016-11-24 16:07:55 +0000 |
| commit | 71087d933ab55466237f4687243e866913c64ccf (patch) | |
| tree | e74e9875691ab2071829fa917a7c2a05540dee0d /src/mailman/app/subscriptions.py | |
| parent | 28ee840bbb4ef616fa2655452534a1f1ba687b00 (diff) | |
| parent | c8461ab681c1e6f0a8b00134348fc675d1c07e68 (diff) | |
| download | mailman-71087d933ab55466237f4687243e866913c64ccf.tar.gz mailman-71087d933ab55466237f4687243e866913c64ccf.tar.zst mailman-71087d933ab55466237f4687243e866913c64ccf.zip | |
Merge branch 'workflow-attribute-dependencies' into 'master'
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 (it did happen). In this case, use the associated address to find the new user.
This requires that the address be restored before the user. The current method to restore does not guarantee the order, so I changed it to allow attributes to depend on one another.
See merge request !190
Diffstat (limited to 'src/mailman/app/subscriptions.py')
| -rw-r--r-- | src/mailman/app/subscriptions.py | 3 |
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): |
