Skip to content

Commit

Permalink
preview_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 183740e commit 5001b8f
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 @@ -1213,7 +1213,10 @@ def preview_files_panel(request, project_slug, **kwargs):
manipulate them. Called via ajax to navigate directories.
"""
project = kwargs['project']
subdir = request.GET['subdir']
try:
subdir = request.GET['subdir']
except KeyError:
raise Http404()

(display_files, display_dirs, dir_breadcrumbs, parent_dir,
file_error) = get_project_file_info(project=project, subdir=subdir)
Expand Down

0 comments on commit 5001b8f

Please sign in to comment.