Skip to content

Commit

Permalink
project_files_panel: return 404 for missing query parameter.
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Moody committed May 6, 2024
1 parent 3f1128e commit 183740e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion physionet-django/project/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,10 @@ def project_files_panel(request, project_slug, **kwargs):
"""
project, is_submitting = (kwargs[k] for k in ('project', 'is_submitting'))
is_editor = request.user == project.editor
subdir = request.GET['subdir']
try:
subdir = request.GET['subdir']
except KeyError:
raise Http404()

if is_submitting and project.author_editable():
files_editable = True
Expand Down

0 comments on commit 183740e

Please sign in to comment.