Lots of ugprades to the Disqus importer script

This commit is contained in:
Robin Ward
2016-08-17 15:10:25 -04:00
parent 6af4e6bd05
commit 72d7c055f4
2 changed files with 100 additions and 80 deletions

View File

@ -274,7 +274,7 @@ class ImportScripts::Base
merge = opts.delete(:merge)
post_create_action = opts.delete(:post_create_action)
existing = User.where(email: opts[:email].downcase, username: opts[:username]).first
existing = User.where("email = ? OR username = ?", opts[:email].downcase, opts[:username]).first
return existing if existing && (merge || existing.custom_fields["import_id"].to_i == import_id.to_i)
bio_raw = opts.delete(:bio_raw)