Skip to content

Commit

Permalink
Fix search failing test #1213
Browse files Browse the repository at this point in the history
  • Loading branch information
pushcx committed Oct 7, 2023
2 parents bcf4735 + c060132 commit d316c3b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/search_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def index
# If you are maintaining a searx fork, please don't 'fix' your targeting of this site.
def ignore_searx
return unless params[:utf8] == "✓"
@search = Search.new({}, nil)
@search = Search.new({results_count: 0}, nil)
render :index
end

Expand Down
2 changes: 1 addition & 1 deletion app/models/search.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def initialize params, user
@searcher = user

@results = nil
@results_count = -1
@results_count = params[:results_count] || -1
@invalid_because = nil
end

Expand Down

0 comments on commit d316c3b

Please sign in to comment.