mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 07:11:17 +08:00
DEV: Import script should use case-insensitive check for tag names (#26699)
This commit is contained in:
@ -1759,7 +1759,10 @@ class BulkImport::Generic < BulkImport::Base
|
|||||||
|
|
||||||
tags.each do |row|
|
tags.each do |row|
|
||||||
cleaned_tag_name = DiscourseTagging.clean_tag(row["name"])
|
cleaned_tag_name = DiscourseTagging.clean_tag(row["name"])
|
||||||
tag = Tag.find_or_create_by!(name: cleaned_tag_name)
|
tag =
|
||||||
|
Tag.where("LOWER(name) = ?", cleaned_tag_name.downcase).first_or_create!(
|
||||||
|
name: cleaned_tag_name,
|
||||||
|
)
|
||||||
@tag_mapping[row["id"]] = tag.id
|
@tag_mapping[row["id"]] = tag.id
|
||||||
|
|
||||||
if row["tag_group_id"]
|
if row["tag_group_id"]
|
||||||
|
Reference in New Issue
Block a user