diff --git a/app/models/champs/cojo_champ.rb b/app/models/champs/cojo_champ.rb index 514db2a8e..3a356e838 100644 --- a/app/models/champs/cojo_champ.rb +++ b/app/models/champs/cojo_champ.rb @@ -50,7 +50,7 @@ class Champs::COJOChamp < Champ def update_external_id if accreditation_number_changed? || accreditation_birthdate_changed? - if accreditation_number.present? && accreditation_birthdate.present? && /\A\d+\z/.match?(accreditation_number) + if accreditation_number.present? && accreditation_birthdate.present? && /\A[\d-]+\z/.match?(accreditation_number) self.external_id = { accreditation_number:, accreditation_birthdate: }.to_json else self.external_id = nil