From 8230b00de63910c04dc60685442f1ab5f2bf0b15 Mon Sep 17 00:00:00 2001 From: Thomas NOEL Date: Fri, 23 Nov 2012 14:00:36 +0100 Subject: [PATCH] Revert "workflows: allow marking a status as terminal" This reverts commit af78aecfacc2edd63b0f0185db6fc08ae9840fbf. --- wcs/admin/workflows.ptl | 17 +---------------- wcs/workflows.py | 12 +++--------- 2 files changed, 4 insertions(+), 25 deletions(-) diff --git a/wcs/admin/workflows.ptl b/wcs/admin/workflows.ptl index 26b5d1d97..49debdaf6 100644 --- a/wcs/admin/workflows.ptl +++ b/wcs/admin/workflows.ptl @@ -280,8 +280,7 @@ class WorkflowItemsDir(Directory): class WorkflowStatusPage(Directory): _q_exports = ['', 'delete', 'newitem', ('items', 'items_dir'), - 'update_order', 'edit', 'reassign', 'visibility', - 'force_endpoint', 'unforce_endpoint'] + 'update_order', 'edit', 'reassign', 'visibility'] def __init__(self, workflow, status_id): self.workflow = workflow @@ -361,10 +360,6 @@ class WorkflowStatusPage(Directory): '' '
' @@ -564,16 +559,6 @@ class WorkflowStatusPage(Directory): '

%s

' % _('Edit Workflow Status Visibility') form.render() - def force_endpoint(self): - self.status.forced_endpoint = True - self.workflow.store() - return redirect('.') - - def unforce_endpoint(self): - self.status.forced_endpoint = False - self.workflow.store() - return redirect('.') - class WorkflowStatusDirectory(Directory): _q_exports = [''] diff --git a/wcs/workflows.py b/wcs/workflows.py index 1c36d4868..5d81132ce 100644 --- a/wcs/workflows.py +++ b/wcs/workflows.py @@ -133,12 +133,9 @@ class Workflow(StorableObject): for status in self.possible_status: waitpoint = False endpoint = True - if status.forced_endpoint: - endpoint = True - else: - for item in status.items: - endpoint = item.endpoint and endpoint - waitpoint = item.waitpoint or waitpoint + for item in status.items: + endpoint = item.endpoint and endpoint + waitpoint = item.waitpoint or waitpoint if endpoint or waitpoint: waitpoint_status.append(status) return waitpoint_status @@ -151,8 +148,6 @@ class Workflow(StorableObject): def get_not_endpoint_status(self): not_endpoint_status = [] for status in self.possible_status: - if status.forced_endpoint: - continue endpoint = True for item in status.items: endpoint = item.endpoint and endpoint @@ -340,7 +335,6 @@ class WorkflowStatus: name = None items = None visibility = None - forced_endpoint = False def __init__(self, name = None): self.name = name