Skip to content

Commit

Permalink
Merge pull request #349 from DigitalWPI/pdfviewer_fix_10_26_21
Browse files Browse the repository at this point in the history
Pdfviewer fix 10 26 21
  • Loading branch information
dfmurphy-wpi authored Oct 28, 2021
2 parents cca56b7 + 3cc31b7 commit 88b4a05
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/controllers/pdfviewer_controller.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
class PdfviewerController < ApplicationController
layout "pdfviewer"
def index
@id = params[:id]
@parent_id = FileSet.find(@id).parent_id
if FileSet.exists?(params[:id])
@id = params[:id]
@parent_id = FileSet.find(@id).parent_id
else
redirect_to root_path, alert: "Document not found"
end
end
end

0 comments on commit 88b4a05

Please sign in to comment.