Commit 7cb8e699 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Merge branch '34697-null-check-environment' into 'master'

Add nil check for environment iterator

See merge request gitlab-org/gitlab!18956
parents 7327cfa5 0ac5a632
...@@ -62,7 +62,7 @@ class AutomatedCleanup ...@@ -62,7 +62,7 @@ class AutomatedCleanup
gitlab.deployments(project_path, per_page: DEPLOYMENTS_PER_PAGE).auto_paginate do |deployment| gitlab.deployments(project_path, per_page: DEPLOYMENTS_PER_PAGE).auto_paginate do |deployment|
environment = deployment.environment environment = deployment.environment
next unless environment.name.start_with?('review/') next unless !environment.nil? && environment.name.start_with?('review/')
next if checked_environments.include?(environment.slug) next if checked_environments.include?(environment.slug)
last_deploy = deployment.created_at last_deploy = deployment.created_at
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment