diff options
| author | Barry Warsaw | 2015-04-14 12:46:11 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2015-04-14 12:46:11 -0400 |
| commit | 2787473f0bd4ca3efeadb7f44c8f61c3695e7ecd (patch) | |
| tree | 4ba9e86dd16b53c623410e66c459dc394008b698 /src/mailman/app/workflow.py | |
| parent | 24c01dbd8e93acdc61884b3b9783a0e71fd6df23 (diff) | |
| download | mailman-2787473f0bd4ca3efeadb7f44c8f61c3695e7ecd.tar.gz mailman-2787473f0bd4ca3efeadb7f44c8f61c3695e7ecd.tar.zst mailman-2787473f0bd4ca3efeadb7f44c8f61c3695e7ecd.zip | |
Diffstat (limited to 'src/mailman/app/workflow.py')
| -rw-r--r-- | src/mailman/app/workflow.py | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/mailman/app/workflow.py b/src/mailman/app/workflow.py index 8006f8e51..b83d1c3aa 100644 --- a/src/mailman/app/workflow.py +++ b/src/mailman/app/workflow.py @@ -145,10 +145,12 @@ class Workflow: def restore(self): state_manager = getUtility(IWorkflowStateManager) state = state_manager.restore(self.__class__.__name__, self.token) - if state is not None: - self._next.clear() - if state.step: - self._next.append(state.step) - if state.data is not None: - for attr, value in json.loads(state.data).items(): - setattr(self, attr, value) + if state is None: + # The token doesn't exist in the database. + raise LookupError(self.token) + self._next.clear() + if state.step: + self._next.append(state.step) + if state.data is not None: + for attr, value in json.loads(state.data).items(): + setattr(self, attr, value) |
