diff options
author | Dylan Griffith <dyl.griffith@gmail.com> | 2018-08-10 13:40:50 +0100 |
---|---|---|
committer | Dylan Griffith <dyl.griffith@gmail.com> | 2018-08-10 13:40:50 +0100 |
commit | afda6fa98100b078f546a7cdd8404ade8e86bcc3 (patch) | |
tree | 2542fc53b526df19135d657bffa7e302f8fc6bf6 | |
parent | c8b0a17ff7aab2193092cb32d3203319c14dfea9 (diff) | |
download | gitlab-ce-50193-minor-refactor-auto-devops-enabled-logic.tar.gz |
Minor refactoring simplification of Project#auto_devops_enabled?50193-minor-refactor-auto-devops-enabled-logic
-rw-r--r-- | app/models/project.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index 36089995ed3..4f28e9d6a06 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -500,11 +500,8 @@ class Project < ActiveRecord::Base end def auto_devops_enabled? - if auto_devops&.enabled.nil? - Gitlab::CurrentSettings.auto_devops_enabled? - else - auto_devops.enabled? - end + auto_devops&.enabled? || + has_auto_devops_implicitly_enabled? end def has_auto_devops_implicitly_enabled? |