Do not throw RecordNotFound in find_optional_report

pull/6827/head
Tim Felgentreff 14 years ago
parent 7ad92fce44
commit bc63f0862a
  1. 7
      lib/report/controller.rb

@ -270,11 +270,8 @@ module Report::Controller
if params[:id]
@query = report_engine.find(params[:id].to_i,
:conditions => ["(is_public = 1) OR (#{user_key} = ?)", current_user.id])
if @query
@query.deserialize
else
raise ActiveRecord::RecordNotFound
end
@query.deserialize if @query
end
rescue ActiveRecord::RecordNotFound
end
end

Loading…
Cancel
Save