v2.15.1 Minor fix
This commit is contained in:
		@@ -1,5 +1,5 @@
 | 
				
			|||||||
# gossamer threads migration-import code
 | 
					# gossamer threads migration-import code
 | 
				
			||||||
# v0.15.1
 | 
					# v0.15.2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
require 'mysql2'
 | 
					require 'mysql2'
 | 
				
			||||||
require 'open-uri'
 | 
					require 'open-uri'
 | 
				
			||||||
@@ -312,14 +312,15 @@ class GossamerForumsImporter < ImportScripts::Base
 | 
				
			|||||||
    end
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # For each user, add user ID mapping to SQLite now that we know what the Discourse user ID is, ... and append user bio and import user files
 | 
					    # For each user, add user ID mapping to SQLite now that we know what the Discourse user ID is, ... and append user bio and import user files
 | 
				
			||||||
    users.each do |discourse_user|
 | 
					    users.each do |user|
 | 
				
			||||||
      # discourse_username = sanitize_username(user[:username], user[:email], user[:name])
 | 
					      # discourse_username = sanitize_username(user[:username], user[:email], user[:name])
 | 
				
			||||||
      # discourse_user = User.find_by(username: discourse_username)
 | 
					      discourse_username = user[:username]
 | 
				
			||||||
 | 
					      discourse_user = User.find_by(username: discourse_username)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      # if discourse_user.nil?
 | 
					      if discourse_user.nil?
 | 
				
			||||||
      #   puts "User #{user[:username]} --> #{discourse_username} not found in Discourse. Skipping file import."
 | 
					        puts "User #{user[:username]} --> #{discourse_username} not found in Discourse. Skipping file import."
 | 
				
			||||||
      #   next
 | 
					        next
 | 
				
			||||||
      # end
 | 
					      end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#      # Store the user ID mapping
 | 
					#      # Store the user ID mapping
 | 
				
			||||||
#      @user_id_map[user[:id]] = discourse_user.id
 | 
					#      @user_id_map[user[:id]] = discourse_user.id
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user