diff --git a/gossamer_forums.rb b/gossamer_forums.rb index 0dec3f6..632a4b9 100644 --- a/gossamer_forums.rb +++ b/gossamer_forums.rb @@ -1281,13 +1281,13 @@ class GossamerForumsImporter < ImportScripts::Base # Fetch the mapped Discourse user and category ID based on Gossamer data discourse_user_id = fetch_user_id_mapping(row['user_id_fk']) -# # Check to be certain user has not been deleted, etc. -# if discourse_user_id.nil? || discourse_user_id == 0 -# puts "discourse_user_id is NIL/ZERO for post_id #{row['post_id']}" -# discourse_former_user = User.find_by(username: 'Former_User') -# discourse_user_id = discourse_former_user.id -# puts "discourse_user_id is NOW Former_User id #{discourse_user_id} for post_id #{row['post_id']}" -# end + # Check to be certain user has not been deleted, etc. + if discourse_user_id.nil? || discourse_user_id == 0 + puts "discourse_user_id is NIL/ZERO for post_id #{row['post_id']}" + discourse_former_user = User.find_by(username: 'Former_User') + discourse_user_id = discourse_former_user.id + puts "discourse_user_id is NOW Former_User id #{discourse_user_id} for post_id #{row['post_id']}" + end # Fetch the mapped Discourse user and category ID based on Gossamer data discourse_category_id = fetch_category_id_mapping(row['forum_id_fk'])