impor script fixes
This commit is contained in:
parent
811b8f3281
commit
5ddb82c9b6
|
@ -28,8 +28,8 @@ class ImportScripts::Bespoke < ImportScripts::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def execute
|
def execute
|
||||||
import_users
|
#import_users
|
||||||
import_categories
|
#import_categories
|
||||||
import_posts
|
import_posts
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@ -202,18 +202,20 @@ class ImportScripts::Bespoke < ImportScripts::Base
|
||||||
topic[:post_id] = post[:id]
|
topic[:post_id] = post[:id]
|
||||||
else
|
else
|
||||||
parent = topic_lookup_from_imported_post_id(topic[:post_id])
|
parent = topic_lookup_from_imported_post_id(topic[:post_id])
|
||||||
|
next unless parent
|
||||||
|
|
||||||
mapped[:topic_id] = parent[:topic_id]
|
mapped[:topic_id] = parent[:topic_id]
|
||||||
|
|
||||||
reply_to_post_id = post_id_from_imported_post_id(post[:reply_id])
|
reply_to_post_id = post_id_from_imported_post_id(post[:reply_id])
|
||||||
if reply_to_post_id
|
if reply_to_post_id
|
||||||
reply_to_post_number = @post_number_map[reply_to_post_id]
|
reply_to_post_number = @post_number_map[reply_to_post_id]
|
||||||
if reply_to_post_number
|
if reply_to_post_number && reply_to_post_number > 1
|
||||||
mapped[:reply_to_post_number] = reply_to_post_number
|
mapped[:reply_to_post_number] = reply_to_post_number
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return nil if topic[:deleted] or post[:deleted]
|
next if topic[:deleted] or post[:deleted]
|
||||||
|
|
||||||
mapped
|
mapped
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue