Fix batch row count when deleting a row

This commit is contained in:
Lance Edgar 2017-06-22 00:52:41 -05:00
parent 5a0fa20e03
commit 0d448fe6c5

View file

@ -735,7 +735,10 @@ class BatchMasterView(MasterView):
if not row: if not row:
raise httpexceptions.HTTPNotFound() raise httpexceptions.HTTPNotFound()
row.removed = True row.removed = True
self.handler.refresh_batch_status(row.batch) batch = row.batch
self.handler.refresh_batch_status(batch)
if batch.rowcount is not None:
batch.rowcount -= 1
return self.redirect(self.get_action_url('view', self.get_parent(row))) return self.redirect(self.get_action_url('view', self.get_parent(row)))
def bulk_delete_rows(self): def bulk_delete_rows(self):