Merge pull request #4513 from betagouv/raise-on-borked-france-connect

individual: raise when the individual object cannot be created
This commit is contained in:
Paul Chavard 2019-11-13 11:12:15 +01:00 committed by GitHub
commit 028deebd33
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -10,7 +10,7 @@ class Individual < ApplicationRecord
GENDER_FEMALE = 'Mme'
def self.create_from_france_connect(fc_information)
create(
create!(
nom: fc_information.family_name,
prenom: fc_information.given_name,
gender: fc_information.gender == 'female' ? GENDER_FEMALE : GENDER_MALE