iqdbs: raise exception if not configured.

This commit is contained in:
evazion
2017-04-05 00:37:05 -05:00
parent d66d19f328
commit 0974ef8bd4

View File

@@ -4,8 +4,7 @@ class IqdbQueriesController < ApplicationController
def create
if !Danbooru.config.iqdbs_server
render :nothing => true
return
raise NotImplementedError.new("the IQDBs service isn't configured. Similarity searches are not available.")
end
if params[:url]
@@ -32,4 +31,4 @@ protected
@results = @download.matches
render :layout => false, :action => "create_by_post"
end
end
end