v0.48.1 Further attempts to address MariaDB challenges and make things as foolproof as possible.

This commit is contained in:
David Sainty 2024-08-18 20:10:07 +10:00
parent 6cb21584f3
commit ad7a5f945c

View File

@ -1438,11 +1438,11 @@ class GossamerForumsImporter < ImportScripts::Base
# Fetch the discourse user ID for the reply
reply_user_id = fetch_user_id_mapping(reply_row['user_id_fk'])
if reply_user_id.i == 0
puts "reply_user_id is ZERO for reply post_id #{reply_row['post_id']}"
if reply_user_id.nil? || reply_user_id == 0
puts "reply_user_id is NIL/ZERO for reply post_id #{reply_row['post_id']}"
former_user = User.find_by(username: 'Former_User')
reply_user_id = former_user.id
puts "reply_user_id is NOW #{reply_user_id} for reply post_id #{reply_row['post_id']}"
puts "reply_user_id is NOW Former_User id #{reply_user_id} for reply post_id #{reply_row['post_id']}"
end
puts "TIJ II post_id #{post_id}"