diff options
author | Igor <idrozdov@gitlab.com> | 2019-04-04 17:54:25 +0300 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2019-04-04 17:54:25 +0300 |
commit | 5b6db251a8b8d4528ed161b0462a62ab0bdba458 (patch) | |
tree | d38dd0c0ee458213cffcb517147860a93dff0c7c /app/controllers/dashboard_controller.rb | |
parent | b99b6bb0960f749e1ba9a129be9c0365e306ed96 (diff) |
Consider array params on rendering MR list on dashboard
This fixes the bug, when approver filter is provided,
but dashboard asks to enter any filter
Diffstat (limited to 'app/controllers/dashboard_controller.rb')
-rw-r--r-- | app/controllers/dashboard_controller.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/controllers/dashboard_controller.rb b/app/controllers/dashboard_controller.rb index 75329b05a6f..1a97b39d3ae 100644 --- a/app/controllers/dashboard_controller.rb +++ b/app/controllers/dashboard_controller.rb @@ -46,7 +46,10 @@ class DashboardController < Dashboard::ApplicationController end def check_filters_presence! - @no_filters_set = finder_type.scalar_params.none? { |k| params.key?(k) } + no_scalar_filters_set = finder_type.scalar_params.none? { |k| params.key?(k) } + no_array_filters_set = finder_type.array_params.none? { |k, _| params.key?(k) } + + @no_filters_set = no_scalar_filters_set && no_array_filters_set return unless @no_filters_set |