Commit 59dc7072 authored by Mario Celi's avatar Mario Celi

Ignore labels remove_on_close column

parent c0d9db48
......@@ -9,6 +9,10 @@ class Label < ApplicationRecord
include Sortable
include FromUnion
include Presentable
include IgnorableColumns
# TODO: Project#create_labels can remove column exception when this column is dropped from all envs
ignore_column :remove_on_close, remove_with: '14.1', remove_after: '2021-06-22'
cache_markdown_field :description, pipeline: :single_line
......
......@@ -1420,7 +1420,8 @@ class Project < ApplicationRecord
# rubocop: disable CodeReuse/ServiceClass
def create_labels
Label.templates.each do |label|
params = label.attributes.except('id', 'template', 'created_at', 'updated_at', 'type')
# TODO: remove_on_close exception can be removed after the column is dropped from all envs
params = label.attributes.except('id', 'template', 'created_at', 'updated_at', 'type', 'remove_on_close')
Labels::FindOrCreateService.new(nil, self, params).execute(skip_authorization: true)
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