mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 13:09:18 +08:00
DEV: Import script should use case-insensitive check for tag names (#26699)
This commit is contained in:
parent
8dd883d4e5
commit
a538e2f153
|
@ -1759,7 +1759,10 @@ class BulkImport::Generic < BulkImport::Base
|
|||
|
||||
tags.each do |row|
|
||||
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
|
||||
|
||||
if row["tag_group_id"]
|
||||
|
|
Loading…
Reference in New Issue
Block a user