提交 dfc5bf6b 编写于 作者: J Jacob Vosmaer

Use the default color when migrating labels

上级 e354e548
......@@ -16,7 +16,7 @@ class MigrateTaggableLabels < ActiveRecord::Migration
def create_label_from_tagging(tagging)
target = tagging.taggable
label_name = tagging.tag.name.tr('?&,', '')
label = target.project.labels.find_or_create_by(title: label_name)
label = target.project.labels.find_or_create_by(title: label_name, color: Label::DEFAULT_COLOR)
if label.valid? && LabelLink.create(label: label, target: target)
print '.'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册