From 630ffe0cf83fff526e927c7b4499c4f6dc0cb5b4 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Thu, 22 Feb 2018 12:26:21 -0600 Subject: [PATCH] Don't allow row deletion if batch is marked complete --- tailbone/views/batch/core.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tailbone/views/batch/core.py b/tailbone/views/batch/core.py index 4bac53e4..15a9c496 100644 --- a/tailbone/views/batch/core.py +++ b/tailbone/views/batch/core.py @@ -818,18 +818,18 @@ class BatchMasterView(MasterView): def row_editable(self, row): """ - Batch rows are editable only until batch has been executed. + Batch rows are editable only until batch is complete or executed. """ batch = self.get_parent(row) return self.rows_editable and not batch.executed and not batch.complete def row_deletable(self, row): """ - Batch rows are deletable only until batch has been executed. + Batch rows are deletable only until batch is complete or executed. """ if self.rows_deletable: batch = self.get_parent(row) - if not batch.executed: + if not batch.executed and not batch.complete: return True return False