Commit 0ac5a632 authored by Kyle Wiebers's avatar Kyle Wiebers

Add nil check for environment iterator

parent 1d45c462
......@@ -62,7 +62,7 @@ class AutomatedCleanup
gitlab.deployments(project_path, per_page: DEPLOYMENTS_PER_PAGE).auto_paginate do |deployment|
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)
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