diff options
author | Tiago Botelho <tiagonbotelho@hotmail.com> | 2018-03-27 18:33:29 +0300 |
---|---|---|
committer | Tiago Botelho <tiagonbotelho@hotmail.com> | 2018-03-28 18:28:55 +0300 |
commit | 7fd9e39d885c7d7520ba0a7e45e8c58847f1c11d (patch) | |
tree | 9de4174e5fb03ecb2f324ef2b2c8e622cc51656a /app/models/service.rb | |
parent | bf4a3af06ac4cb7f321267bf395022420e0c14a2 (diff) |
When a Service templates are invalid newly created projects will have them inactive
Diffstat (limited to 'app/models/service.rb')
-rw-r--r-- | app/models/service.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/service.rb b/app/models/service.rb index 1dcb79157a2..7424cef0fc0 100644 --- a/app/models/service.rb +++ b/app/models/service.rb @@ -273,6 +273,7 @@ class Service < ActiveRecord::Base def self.build_from_template(project_id, template) service = template.dup + service.active = false unless service.valid? service.template = false service.project_id = project_id service |