mirror of
https://github.com/discourse/discourse.git
synced 2025-03-22 01:40:39 +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
|
loop do
|
||||||
contents = get("#{path}?#{filters}&sort=dateCreatedAsc&count=#{POST_COUNT}&startIndex=#{start_index}", to_import[:authenticated])
|
contents = get("#{path}?#{filters}&sort=dateCreatedAsc&count=#{POST_COUNT}&startIndex=#{start_index}", to_import[:authenticated])
|
||||||
contents["list"].each do |content|
|
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_id: content_id }
|
||||||
custom_fields[:import_permalink] = content["permalink"] if content["permalink"].present?
|
custom_fields[:import_permalink] = content["permalink"] if content["permalink"].present?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user