Fix redirect bug when attempting bulk row delete for nonexistent batch
This commit is contained in:
parent
f60d304133
commit
cd332f2287
|
@ -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):
|
||||
|
||||
|
|
Loading…
Reference in a new issue