diff options
author | Matija Čupić <matteeyah@gmail.com> | 2018-06-05 13:32:46 +0200 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2018-06-05 13:32:46 +0200 |
commit | 291dc5a21cbf171c14df230dcf056bee6d8bc6f8 (patch) | |
tree | d32f44154c55db9a59ac18f78b61673cc4e3b5bd /app | |
parent | ca1d6d2f6dfd203e8b25e19ca1709ba722d922d1 (diff) | |
download | gitlab-ce-291dc5a21cbf171c14df230dcf056bee6d8bc6f8.tar.gz |
Use nullcheck operator instead of checking for null
Diffstat (limited to 'app')
-rw-r--r-- | app/services/projects/update_service.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/projects/update_service.rb b/app/services/projects/update_service.rb index 1cea110d555..ba21b33bbfe 100644 --- a/app/services/projects/update_service.rb +++ b/app/services/projects/update_service.rb @@ -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 |