summaryrefslogtreecommitdiff
path: root/src/mailman/app/subscriptions.py
diff options
context:
space:
mode:
authorBarry Warsaw2015-04-13 18:28:59 -0400
committerBarry Warsaw2015-04-13 18:28:59 -0400
commit24c01dbd8e93acdc61884b3b9783a0e71fd6df23 (patch)
tree18d2503ae488efa403f9606b9fbdf67298fec7ff /src/mailman/app/subscriptions.py
parentf7a4e76d24898ec942a0f3a9a932916d9d0662bc (diff)
downloadmailman-24c01dbd8e93acdc61884b3b9783a0e71fd6df23.tar.gz
mailman-24c01dbd8e93acdc61884b3b9783a0e71fd6df23.tar.zst
mailman-24c01dbd8e93acdc61884b3b9783a0e71fd6df23.zip
Diffstat (limited to 'src/mailman/app/subscriptions.py')
-rw-r--r--src/mailman/app/subscriptions.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mailman/app/subscriptions.py b/src/mailman/app/subscriptions.py
index 6c60a71a4..999b04270 100644
--- a/src/mailman/app/subscriptions.py
+++ b/src/mailman/app/subscriptions.py
@@ -50,6 +50,7 @@ from mailman.interfaces.subscriptions import (
ISubscriptionService, MissingUserError, RequestRecord)
from mailman.interfaces.user import IUser
from mailman.interfaces.usermanager import IUserManager
+from mailman.interfaces.workflow import IWorkflowStateManager
from mailman.model.member import Member
from mailman.utilities.datetime import now
from mailman.utilities.i18n import make
@@ -176,7 +177,6 @@ class SubscriptionWorkflow(Workflow):
# Create a pending record. This will give us the hash token we can use
# to uniquely name this workflow.
pendable = Pendable(
- when=now().isoformat(),
list_id=self.mlist.list_id,
address=self.address.email,
)
@@ -268,6 +268,9 @@ class SubscriptionWorkflow(Workflow):
def _step_do_subscription(self):
# We can immediately subscribe the user to the mailing list.
self.mlist.subscribe(self.subscriber)
+ # This workflow is done so throw away any associated state.
+ getUtility(IWorkflowStateManager).restore(self.name, self.token)
+ self.token = None
def _step_send_confirmation(self):
self.push('do_confirm_verify')