diff options
author | Shinya Maeda <shinya@gitlab.com> | 2018-11-28 13:59:04 +0900 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2018-11-28 13:59:04 +0900 |
commit | dc96d96ac536cd7b1a91f3505af9df6c214750d3 (patch) | |
tree | c05c06dbe82ab19fd9356bd98621bf19bb6af3a6 | |
parent | a3ba7b3119e857c61d9a270c1e59922ab4d7c434 (diff) | |
download | gitlab-ce-fix-mr-widget-unrelated-deployment-status.tar.gz |
Return empty array if pipeline is nilfix-mr-widget-unrelated-deployment-status
-rw-r--r-- | app/models/environment_status.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/environment_status.rb b/app/models/environment_status.rb index 4483fe86b5b..9e72d7e9bb4 100644 --- a/app/models/environment_status.rb +++ b/app/models/environment_status.rb @@ -77,7 +77,7 @@ class EnvironmentStatus end def self.build_environments_status(mr, user, pipeline) - return unless pipeline + return [] unless pipeline pipeline.environments.map do |environment| next unless Ability.allowed?(user, :read_environment, environment) |