diff options
author | Phil Hughes <me@iamphill.com> | 2018-04-07 10:08:34 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-04-07 10:08:34 +0100 |
commit | 4581a78d66a93c6d82b39d1214b75e15681a9960 (patch) | |
tree | 4fecac73aba986ddcce6a82515bf7775d212f986 /app/models/milestone.rb | |
parent | 690c57867d6dcaaaee15208e9d4de6ec85f19e80 (diff) | |
parent | 671e93dc38365f3b05cb3cfe719e64713196be31 (diff) | |
download | gitlab-ce-4581a78d66a93c6d82b39d1214b75e15681a9960.tar.gz |
Merge branch 'master' into ide-staged-changes
Diffstat (limited to 'app/models/milestone.rb')
-rw-r--r-- | app/models/milestone.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/milestone.rb b/app/models/milestone.rb index dafae58d121..a66a0015827 100644 --- a/app/models/milestone.rb +++ b/app/models/milestone.rb @@ -34,8 +34,8 @@ class Milestone < ActiveRecord::Base scope :for_projects_and_groups, -> (project_ids, group_ids) do conditions = [] - conditions << arel_table[:project_id].in(project_ids) if project_ids.compact.any? - conditions << arel_table[:group_id].in(group_ids) if group_ids.compact.any? + conditions << arel_table[:project_id].in(project_ids) if project_ids&.compact&.any? + conditions << arel_table[:group_id].in(group_ids) if group_ids&.compact&.any? where(conditions.reduce(:or)) end |