mirror of
https://github.com/meineerde/redmine.git
synced 2026-02-01 03:57:15 +00:00
avoid using rescue in its modifier form at AttachmentsController#find_container
git-svn-id: http://svn.redmine.org/redmine/trunk@19863 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
562dea3aa8
commit
8b0c21cbf8
@ -218,7 +218,12 @@ class AttachmentsController < ApplicationController
|
||||
end
|
||||
|
||||
def find_container
|
||||
klass = params[:object_type].to_s.singularize.classify.constantize rescue nil
|
||||
klass =
|
||||
begin
|
||||
params[:object_type].to_s.singularize.classify.constantize
|
||||
rescue
|
||||
nil
|
||||
end
|
||||
unless klass && klass.reflect_on_association(:attachments)
|
||||
render_404
|
||||
return
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user