summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/models/environment_status.rb2
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)