Skip to content

Commit

Permalink
CV2-3738: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
melsawy committed Sep 21, 2023
1 parent 62c6f85 commit 4beb3b3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/check_search.rb
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,10 @@ def adjust_project_filter
# Invalidate the search if empty... otherwise, adjust the projects filter
@options['projects'] = project_ids.empty? ? [0] : project_ids
end
if Team.current && !feed_query? && [@options['team_id']].flatten.size == 1
t = Team.find([@options['team_id']].flatten.first)
@options['projects'] = @options['projects'].blank? ? (Project.where(team_id: t.id).map(&:id) + [nil]) : Project.where(id: @options['projects'], team_id: t.id).map(&:id)
end
@options['projects'] += [nil] if @options['none_project']
end

Expand Down

0 comments on commit 4beb3b3

Please sign in to comment.