diff options
author | Douwe Maan <douwe@selenight.nl> | 2018-07-05 11:43:48 +0200 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2018-07-05 11:43:48 +0200 |
commit | 7e34a19f291cecb359e9e77c60a0fc169fe3c18c (patch) | |
tree | 154c17ded4a874305c7c44d54aa6981ea435aaea /app/models | |
parent | 3f784d8f3413288cc39da5577ce6b5c17eb9c004 (diff) | |
download | gitlab-ce-7e34a19f291cecb359e9e77c60a0fc169fe3c18c.tar.gz |
Check whether new service created from template is valid after unflagging it as a template
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/service.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/service.rb b/app/models/service.rb index 1d259bcfec7..ad835293b46 100644 --- a/app/models/service.rb +++ b/app/models/service.rb @@ -281,9 +281,9 @@ 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.active = false if service.active? && !service.valid? service end |