From cd332f2287db8e67d6ef5f0a4ffdb0dc70938452 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Tue, 22 Mar 2016 18:56:48 -0500 Subject: [PATCH] Fix redirect bug when attempting bulk row delete for nonexistent batch --- tailbone/views/batches/rows.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tailbone/views/batches/rows.py b/tailbone/views/batches/rows.py index 071790e4..edf07c1b 100644 --- a/tailbone/views/batches/rows.py +++ b/tailbone/views/batches/rows.py @@ -2,7 +2,7 @@ ################################################################################ # # Rattail -- Retail Software Framework -# Copyright © 2010-2014 Lance Edgar +# Copyright © 2010-2016 Lance Edgar # # This file is part of Rattail. # @@ -24,7 +24,7 @@ Batch Row Views """ -from __future__ import unicode_literals +from __future__ import unicode_literals, absolute_import from pyramid.httpexceptions import HTTPFound @@ -55,7 +55,7 @@ def BatchRowsGrid(request): uuid = request.matchdict['uuid'] batch = Session.query(Batch).get(uuid) if uuid else None if not batch: - return HTTPFound(location=request.route_url('batches')) + raise HTTPFound(location=request.route_url('batches')) class BatchRowsGrid(SearchableAlchemyGridView):