diff --git a/tailbone/views/batch/core.py b/tailbone/views/batch/core.py index 5e0359ec..720ef62f 100644 --- a/tailbone/views/batch/core.py +++ b/tailbone/views/batch/core.py @@ -729,15 +729,15 @@ class BatchMasterView(MasterView): "Delete" a row from the batch. This sets the ``removed`` flag on the row but does not truly delete it. """ - row = self.Session.query(self.model_row_class).get(self.request.matchdict['uuid']) + row = self.Session.query(self.model_row_class).get(self.request.matchdict['row_uuid']) if not row: raise httpexceptions.HTTPNotFound() row.removed = True - batch = row.batch + batch = self.get_parent(row) 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', batch)) def bulk_delete_rows(self): """