Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor <idrozdov@gitlab.com>2019-04-04 17:54:25 +0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2019-04-04 17:54:25 +0300
commit5b6db251a8b8d4528ed161b0462a62ab0bdba458 (patch)
treed38dd0c0ee458213cffcb517147860a93dff0c7c /app/controllers/dashboard_controller.rb
parentb99b6bb0960f749e1ba9a129be9c0365e306ed96 (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.rb5
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