From 123fa375eae1d2198889a8aed548d05cefe9d457 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Thu, 6 Sep 2012 11:42:27 -0700 Subject: [PATCH] fix Batch.rowcount when deleting multiple rows --- rattail/pyramid/views/batches/rows.py | 1 + 1 file changed, 1 insertion(+) diff --git a/rattail/pyramid/views/batches/rows.py b/rattail/pyramid/views/batches/rows.py index ba6fb42c..9c389767 100644 --- a/rattail/pyramid/views/batches/rows.py +++ b/rattail/pyramid/views/batches/rows.py @@ -132,6 +132,7 @@ def batch_rows_delete(request): rows = grid.make_query() count = rows.count() rows.delete(synchronize_session=False) + grid.batch.rowcount -= count request.session.flash("Deleted %d rows from batch." % count) return HTTPFound(location=request.route_url('batch.rows', uuid=grid.batch.uuid))