Fix boolean logic with nil value

This commit is contained in:
Zeger-Jan van de Weg 2017-09-04 15:58:01 +02:00
parent d8e40c2aa6
commit 63e308f6a5
No known key found for this signature in database
GPG Key ID: 65F6A8D64A88ABAC
1 changed files with 1 additions and 1 deletions

View File

@ -469,7 +469,7 @@ class Project < ActiveRecord::Base
end
def auto_devops_enabled?
if auto_devops
if auto_devops && !auto_devops.enabled.nil?
auto_devops.enabled?
else
current_application_settings.auto_devops_enabled?