mirror of
https://github.com/discourse/discourse.git
synced 2025-03-20 16:35:34 +08:00
FIX: ensure we never collide ids in the JIVE API importer
This commit is contained in:
parent
17c29c972b
commit
4e8e9c2d2f
@ -137,7 +137,7 @@ class ImportScripts::JiveApi < ImportScripts::Base
|
||||
loop do
|
||||
contents = get("#{path}?#{filters}&sort=dateCreatedAsc&count=#{POST_COUNT}&startIndex=#{start_index}", to_import[:authenticated])
|
||||
contents["list"].each do |content|
|
||||
content_id = content["contentID"].presence || content["id"]
|
||||
content_id = content["contentID"].presence || "#{content["type"]}_#{content["id"]}"
|
||||
|
||||
custom_fields = { import_id: content_id }
|
||||
custom_fields[:import_permalink] = content["permalink"] if content["permalink"].present?
|
||||
|
Loading…
x
Reference in New Issue
Block a user