Skip to content
Snippets Groups Projects
Commit d71a8c1e authored by pabois's avatar pabois
Browse files

adjust person importer

parent 4358bba4
No related branches found
No related tags found
No related merge requests found
......@@ -56,11 +56,11 @@ module Importers
def build_person
if @email.present?
person = @university.people
.where(email: @email)
.where(language_id: @university.default_language_id, email: @email)
.first_or_initialize
elsif @first_name.present? && @last_name.present?
person = @university.people
.where(first_name: @first_name, last_name: @last_name)
.where(language_id: @university.default_language_id, first_name: @first_name, last_name: @last_name)
.first_or_initialize
else
# No mail, no name, nothing
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment