Commit b85f7a74 authored by Sean McGivern's avatar Sean McGivern Committed by Ruben Davila

Merge branch 'issue_25112' into 'master'

Disable invalid service templates

Closes #25112

See merge request !8850
Conflicts:
	db/schema.rb
parent b57e8a4f
---
title: Disable invalid service templates
merge_request:
author:
class DisableInvalidServiceTemplates < ActiveRecord::Migration
DOWNTIME = false
unless defined?(Service)
class Service < ActiveRecord::Base
self.inheritance_column = nil
end
end
def up
Service.where(template: true, active: true).each do |template|
template.update(active: false) unless template.valid?
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment