diff --git a/gossamer_forums.rb b/gossamer_forums.rb index 021472f..be954c2 100644 --- a/gossamer_forums.rb +++ b/gossamer_forums.rb @@ -1,7 +1,7 @@ # Federated Computer, Inc. # David Sainty 2024 A.D. # Gossamer Threads to Discourse -- Migration-Import Script -# v0.47 Significant tweaks and workarounds to try to improve smooth operation. +# v0.47.1 Fix .id nil bug require 'mysql2' require 'open-uri' @@ -1384,6 +1384,10 @@ class GossamerForumsImporter < ImportScripts::Base ## begin # Fetch the discourse user ID for the reply reply_user_id = fetch_user_id_mapping(reply_row['user_id_fk']) + if reply_user_id = 0 + former_user = User.find_by(username: 'Former_User') + reply_user_id = former.user.id + end puts "TIJ II post_id #{post_id}" # Sanitize and prepare the reply message for Discourse