Browse Source

Birth date not required in import

Maarten van den Berg 7 years ago
parent
commit
279a0e2d5f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/models/person.rb

+ 1 - 1
app/models/person.rb

81
         p.infix       = row['infix']
81
         p.infix       = row['infix']
82
         p.last_name   = row['last_name']
82
         p.last_name   = row['last_name']
83
         p.email       = row['email']
83
         p.email       = row['email']
84
-        p.birth_date  = Date.strptime(row['birth_date'])
84
+        p.birth_date  = Date.strptime(row['birth_date']) unless row['birth_date'].blank?
85
         p.save!
85
         p.save!
86
       end
86
       end
87
       result << p
87
       result << p