summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorMatija Čupić <matteeyah@gmail.com>2018-06-05 13:32:46 +0200
committerMatija Čupić <matteeyah@gmail.com>2018-06-05 13:32:46 +0200
commit291dc5a21cbf171c14df230dcf056bee6d8bc6f8 (patch)
treed32f44154c55db9a59ac18f78b61673cc4e3b5bd /app
parentca1d6d2f6dfd203e8b25e19ca1709ba722d922d1 (diff)
downloadgitlab-ce-291dc5a21cbf171c14df230dcf056bee6d8bc6f8.tar.gz
Use nullcheck operator instead of checking for null
Diffstat (limited to 'app')
-rw-r--r--app/services/projects/update_service.rb2
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