From e2cdb4387a33d1add01269b25b78606f0537175e Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Thu, 11 Jan 2018 12:25:25 -0600 Subject: [PATCH] Fix row query bug when deleting batch row --- tailbone/views/batch/core.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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): """