mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
FIX: Importers should allow categories with existing name if the parent category is different
This changes the content of `@categories_lookup` from `Category` objects to IDs since the category names aren't needed anymore. The lookup method has been renamed too.
This commit is contained in:
@ -200,7 +200,7 @@ class ImportScripts::Ning < ImportScripts::Base
|
||||
mapped[:user_id] = user_id_from_imported_user_id(topic["contributorName"]) || -1
|
||||
mapped[:created_at] = Time.zone.parse(topic["createdDate"])
|
||||
unless topic["category"].nil? || topic["category"].downcase == "uncategorized"
|
||||
mapped[:category] = category_from_imported_category_id(topic["category"]).try(:name)
|
||||
mapped[:category] = category_id_from_imported_category_id(topic["category"])
|
||||
end
|
||||
if topic["category"].nil? && default_category
|
||||
mapped[:category] = default_category
|
||||
|
Reference in New Issue
Block a user