Skip to content

Commit

Permalink
Merge pull request #328 from bgeuken/fix_set_search_options
Browse files Browse the repository at this point in the history
Fix set search options
  • Loading branch information
dmacvicar committed Jun 11, 2018
2 parents 5fe7b1f + 7e76423 commit 6f37a71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/obs_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def parse_distribution(element)

def set_search_options
@search_term = params[:q] || ""
@baseproject = if !cookies[:baseproject].nil? && @distributions.select { |d| d[:project] == cookies[:baseproject] }
@baseproject = if cookies[:baseproject] && @distributions.any? { |d| d[:project] == cookies[:baseproject] }
cookies[:baseproject]
else
"openSUSE:Factory"
Expand Down

0 comments on commit 6f37a71

Please sign in to comment.