Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkCalvert committed Jun 12, 2022
2 parents ea55acb + fd6ff38 commit faf32cc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ckanext/fortify/blueprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
_ = toolkit._
config = toolkit.config
asbool = toolkit.asbool
abort = toolkit.abort

fortify = Blueprint(u'fortify', __name__)

Expand Down Expand Up @@ -134,7 +135,7 @@ def download(package_type, id, resource_id, filename=None):
rsc = get_action(u'resource_show')(context, {u'id': resource_id})
get_action(u'package_show')(context, {u'id': id})
except (NotFound, NotAuthorized):
return base.abort(404, _(u'Resource not found'))
return abort(404, _(u'Resource not found'))

if rsc.get(u'url_type') == u'upload':
upload = uploader.get_resource_uploader(rsc)
Expand All @@ -148,7 +149,7 @@ def download(package_type, id, resource_id, filename=None):
return flask.send_file(filepath)
# Fortify updates end
elif u'url' not in rsc:
return base.abort(404, _(u'No download is available'))
return abort(404, _(u'No download is available'))
return h.redirect_to(rsc[u'url'])

fortify.add_url_rule(
Expand Down

0 comments on commit faf32cc

Please sign in to comment.