Merge pull request #10590 from colinux/cojo-with-dash
ETQ usager, je peux saisir le numéro d'accréditation COJO avec le suffixe `-01`
This commit is contained in:
commit
6b5aa697cf
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue