wrap user import in try

This commit is contained in:
Kiara Grouwstra 2023-10-07 19:09:55 +02:00
parent 05e19b712a
commit 61fb74ac23
1 changed files with 4 additions and 1 deletions

View File

@ -173,7 +173,10 @@ class UsersController < ApplicationController
fields = defaults.merge(row.to_hash)
fields[:room_id] = room_id
fields['email'] = fields['email'].strip
User.create!(fields)
begin
User.create!(fields)
rescue
end
end
respond_to do |format|