Use the default color when migrating labels

This commit is contained in:
Jacob Vosmaer 2014-08-19 17:43:17 +02:00
parent e354e548b9
commit dfc5bf6bf7
1 changed files with 1 additions and 1 deletions

View File

@ -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 '.'