Skip to content
Snippets Groups Projects
Verified Commit 291dc5a2 authored by Matija Čupić's avatar Matija Čupić
Browse files

Use nullcheck operator instead of checking for null

parent ca1d6d2f
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -36,7 +36,7 @@ module Projects
end
 
def run_auto_devops_pipeline?
return false if project.repository.gitlab_ci_yml || project.auto_devops.nil? || !project.auto_devops.previous_changes.include?('enabled')
return false if project.repository.gitlab_ci_yml || !project.auto_devops&.previous_changes&.include?('enabled')
 
project.auto_devops.enabled? || (project.auto_devops.enabled.nil? && Gitlab::CurrentSettings.auto_devops_enabled?)
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment