From 11a63ab2efa493ac839997ed860a0f768bb918a8 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Sat, 2 Dec 2017 13:24:38 -0600 Subject: [PATCH] Fix batch row count when bulk-deleting rows --- tailbone/views/batch/core.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tailbone/views/batch/core.py b/tailbone/views/batch/core.py index 9051d48b..a83b4e73 100644 --- a/tailbone/views/batch/core.py +++ b/tailbone/views/batch/core.py @@ -738,9 +738,11 @@ class BatchMasterView(MasterView): "Delete" all rows matching the current row grid view query. This sets the ``removed`` flag on the rows but does not truly delete them. """ + batch = self.get_instance() query = self.get_effective_row_data(sort=False) + batch.rowcount -= query.count() query.update({'removed': True}, synchronize_session=False) - return self.redirect(self.get_action_url('view', self.get_instance())) + return self.redirect(self.get_action_url('view', batch)) def execute(self): """