Fix batch row count when bulk-deleting rows
This commit is contained in:
parent
9cf5c9385d
commit
11a63ab2ef
|
@ -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):
|
||||
"""
|
||||
|
|
Loading…
Reference in a new issue