fix import service
This commit is contained in:
parent
06958cbdd1
commit
87ce71f27d
1 changed files with 1 additions and 1 deletions
|
@ -6,7 +6,7 @@ class InstructeursImportService
|
||||||
admins = procedure.administrateurs
|
admins = procedure.administrateurs
|
||||||
|
|
||||||
groupes_emails, error_groupe_emails = groupes_emails
|
groupes_emails, error_groupe_emails = groupes_emails
|
||||||
.map { |groupe_email| { "groupe" => groupe_email["groupe"].strip, "email" => groupe_email["email"].gsub(/[[:space:]]/, '').downcase } }
|
.map { |groupe_email| { "groupe" => groupe_email["groupe"].present? ? groupe_email["groupe"].strip : nil, "email" => groupe_email["email"].present? ? groupe_email["email"].gsub(/[[:space:]]/, '').downcase : nil } }
|
||||||
.partition { |groupe_email| Devise.email_regexp.match?(groupe_email['email']) && groupe_email['groupe'].present? }
|
.partition { |groupe_email| Devise.email_regexp.match?(groupe_email['email']) && groupe_email['groupe'].present? }
|
||||||
|
|
||||||
errors = error_groupe_emails.map { |group_email| group_email['email'] }
|
errors = error_groupe_emails.map { |group_email| group_email['email'] }
|
||||||
|
|
Loading…
Add table
Reference in a new issue