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
1 changed files with 2 additions and 1 deletions

View File

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