fix showing message when advisory not found
This commit is contained in:
parent
58da53d066
commit
835e7b54cb
|
@ -21,7 +21,7 @@ class AdvisoriesController < ApplicationController
|
|||
|
||||
def search
|
||||
@advisory = Advisory.by_update_type(params[:bl_type]).search_by_id(params[:query]).first
|
||||
raise ActionController::RoutingError.new('Not Found') if @advisory.nil?
|
||||
raise ActiveRecord::RecordNotFound.new('Not Found') if @advisory.nil?
|
||||
respond_to do |format|
|
||||
format.json { render @advisory }
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue