Commit e354e548 authored by Jacob Vosmaer's avatar Jacob Vosmaer

Remove invalid characters from the label name

parent 7e0a2b3b
......@@ -15,7 +15,7 @@ class MigrateTaggableLabels < ActiveRecord::Migration
def create_label_from_tagging(tagging)
target = tagging.taggable
label_name = tagging.tag.name
label_name = tagging.tag.name.tr('?&,', '')
label = target.project.labels.find_or_create_by(title: label_name)
if label.valid? && LabelLink.create(label: label, target: target)
......
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