mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 07:53:49 +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:
@ -87,7 +87,7 @@ class ImportScripts::Bbpress < ImportScripts::Base
|
||||
mapped[:custom_fields] = {import_id: post["id"]}
|
||||
|
||||
if post["post_type"] == "topic"
|
||||
mapped[:category] = category_from_imported_category_id(post["post_parent"]).try(:name)
|
||||
mapped[:category] = category_id_from_imported_category_id(post["post_parent"])
|
||||
mapped[:title] = CGI.unescapeHTML post["post_title"]
|
||||
else
|
||||
parent = topic_lookup_from_imported_post_id(post["post_parent"])
|
||||
|
Reference in New Issue
Block a user