Emit 404 on admin page of missing workflow id

This commit is contained in:
Benjamin Dauvergne 2011-06-29 23:35:09 +02:00 committed by Frédéric Péters
parent d1075fe2c5
commit 9b12cef712
1 changed files with 4 additions and 1 deletions

View File

@ -381,7 +381,10 @@ class WorkflowPage(Directory):
'duplicate', 'export']
def __init__(self, component):
self.workflow = Workflow.get(component)
try:
self.workflow = Workflow.get(component)
except KeyError:
raise errors.TraversalError()
self.workflow_ui = WorkflowUI(self.workflow)
self.status_dir = WorkflowStatusDirectory(self.workflow)
get_response().breadcrumb.append((component + '/', self.workflow.name))