Skip to content

Commit 88b4a05

Browse files
authored
Merge pull request #349 from DigitalWPI/pdfviewer_fix_10_26_21
Pdfviewer fix 10 26 21
2 parents cca56b7 + 3cc31b7 commit 88b4a05

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed
+6-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
class PdfviewerController < ApplicationController
22
layout "pdfviewer"
33
def index
4-
@id = params[:id]
5-
@parent_id = FileSet.find(@id).parent_id
4+
if FileSet.exists?(params[:id])
5+
@id = params[:id]
6+
@parent_id = FileSet.find(@id).parent_id
7+
else
8+
redirect_to root_path, alert: "Document not found"
9+
end
610
end
711
end

0 commit comments

Comments
 (0)