diff --git a/gossamer_forums.rb b/gossamer_forums.rb index e7d3d6a..2f88be2 100644 --- a/gossamer_forums.rb +++ b/gossamer_forums.rb @@ -1,5 +1,5 @@ # gossamer threads migration-import code -# v0.17.1 +# v0.17.2 require 'mysql2' require 'open-uri' @@ -226,7 +226,7 @@ class GossamerForumsImporter < ImportScripts::Base # Helper method to handle post attachments def handle_post_attachments(gossamer_post_id, post, user_id) - execute_query("SELECT * FROM gforum_PostAttachment WHERE post_id_fk = #{post_id}").each do |att_row| + execute_query("SELECT * FROM gforum_PostAttachment WHERE post_id_fk = #{gossamer_post_id}").each do |att_row| attachment_url = "https://forum.slowtwitch.com/forum/?do=post_attachment;postatt_id=#{att_row['postatt_id']}" attachment_data = download_attachment(attachment_url) next unless attachment_data