Skip to content
Snippets Groups Projects
Commit a2e119f0 authored by Rajmund Hruška's avatar Rajmund Hruška
Browse files

Fix: Abort with 400 when file type is not recognized. (Redmine issue: #7588)

parent 6a3f6d63
No related branches found
No related tags found
No related merge requests found
......@@ -369,7 +369,7 @@ class DataView(FileIdView):
elif filetype == 'jsonzip':
fileext = 'json.zip'
else:
raise ValueError("Requested invalid data file type '{}'".format(filetype))
flask.abort(400, "Requested invalid data file type '{}'".format(filetype))
return 'security-report-{}.{}'.format(fileid, fileext)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment