v0.47.1 Fix .id nil bug
This commit is contained in:
parent
468b8b725b
commit
3e608d599b
@ -1,7 +1,7 @@
|
||||
# Federated Computer, Inc.
|
||||
# David Sainty <saint@federated.computer> 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
|
||||
|
Loading…
Reference in New Issue
Block a user