2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 10:50:21 +08:00

Show original options when an error happens while importing an user

This commit is contained in:
Régis Hanol 2018-10-18 10:21:12 +02:00
parent bbf542da01
commit 5f2fb0fe33

View file

@ -283,6 +283,7 @@ class ImportScripts::Base
end end
def create_user(opts, import_id) def create_user(opts, import_id)
original_opts = opts.dup
opts.delete(:id) opts.delete(:id)
merge = opts.delete(:merge) merge = opts.delete(:merge)
post_create_action = opts.delete(:post_create_action) post_create_action = opts.delete(:post_create_action)
@ -360,7 +361,7 @@ class ImportScripts::Base
u = existing u = existing
end end
else else
puts "Error on record: #{opts.inspect}" puts "Error on record: #{original_opts.inspect}"
raise e raise e
end end
end end