Fix row query bug when deleting batch row
This commit is contained in:
parent
3dce9d9ed3
commit
e2cdb4387a
|
@ -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):
|
||||
"""
|
||||
|
|
Loading…
Reference in a new issue