diff options
author | Heinrich Lee Yu <hleeyu@gmail.com> | 2018-10-26 05:47:14 +0300 |
---|---|---|
committer | Heinrich Lee Yu <hleeyu@gmail.com> | 2018-10-26 05:47:14 +0300 |
commit | e0f0c29b0cfe3c0c97191eeb96eae1299f3983d1 (patch) | |
tree | f5227f2614264fb1820ab1747579e11a5c9826c5 /app/finders | |
parent | bf1ed85a9d6a932a99d0a5fdf70e72ea36c2600c (diff) |
Support lowercase none / any
Diffstat (limited to 'app/finders')
-rw-r--r-- | app/finders/issuable_finder.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/finders/issuable_finder.rb b/app/finders/issuable_finder.rb index ec4472de0c4..eb3d2498830 100644 --- a/app/finders/issuable_finder.rb +++ b/app/finders/issuable_finder.rb @@ -35,8 +35,8 @@ class IssuableFinder requires_cross_project_access unless: -> { project? } # This is used as a common filter for None / Any - FILTER_NONE = 'None'.freeze - FILTER_ANY = 'Any'.freeze + FILTER_NONE = 'none'.freeze + FILTER_ANY = 'any'.freeze # This is accepted as a deprecated filter and is also used in unassigning users NONE = '0'.freeze @@ -250,11 +250,11 @@ class IssuableFinder def filter_by_no_assignee? # Assignee_id takes precedence over assignee_username - [NONE, FILTER_NONE].include?(params[:assignee_id].to_s) || params[:assignee_username].to_s == NONE + [NONE, FILTER_NONE].include?(params[:assignee_id].to_s.downcase) || params[:assignee_username].to_s == NONE end def filter_by_any_assignee? - params[:assignee_id].to_s == FILTER_ANY + params[:assignee_id].to_s.downcase == FILTER_ANY end # rubocop: disable CodeReuse/ActiveRecord |