mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-15 15:46:08 +10:00
Test if the label is valid before creating link
This commit is contained in:
@@ -18,7 +18,7 @@ class MigrateTaggableLabels < ActiveRecord::Migration
|
||||
label_name = tagging.tag.name
|
||||
label = target.project.labels.find_or_create_by(title: label_name)
|
||||
|
||||
if LabelLink.create(label: label, target: target)
|
||||
if label.valid? && LabelLink.create(label: label, target: target)
|
||||
print '.'
|
||||
else
|
||||
print 'F'
|
||||
|
||||
Reference in New Issue
Block a user