fix Batch.rowcount when deleting multiple rows
This commit is contained in:
parent
0a85bc2ba6
commit
123fa375ea
|
@ -132,6 +132,7 @@ def batch_rows_delete(request):
|
||||||
rows = grid.make_query()
|
rows = grid.make_query()
|
||||||
count = rows.count()
|
count = rows.count()
|
||||||
rows.delete(synchronize_session=False)
|
rows.delete(synchronize_session=False)
|
||||||
|
grid.batch.rowcount -= count
|
||||||
request.session.flash("Deleted %d rows from batch." % count)
|
request.session.flash("Deleted %d rows from batch." % count)
|
||||||
return HTTPFound(location=request.route_url('batch.rows', uuid=grid.batch.uuid))
|
return HTTPFound(location=request.route_url('batch.rows', uuid=grid.batch.uuid))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue