fix: Un problème d'import des contacts

This commit is contained in:
Simon 2023-01-11 11:22:05 +01:00
parent 60c6676755
commit 8abc53adbe
1 changed files with 15 additions and 11 deletions

View File

@ -41,18 +41,22 @@ const config = {
const bureau = []
for (const contact of association.bureau) {
const detail = contact.Contact_id
let c = {
denomination: detail.denomination,
prenom: detail.prenom,
nom: detail.nom,
if (detail) {
let c = {
denomination: detail.denomination,
prenom: detail.prenom,
nom: detail.nom,
}
if (detail.mail && detail.display_mail) {
c.mail = detail.mail
}
if (detail.telephone && detail.display_telephone) {
c.telephone = detail.telephone
}
bureau.push(c)
} else {
console.log("problème sur un contact")
}
if (detail.mail && detail.display_mail) {
c.mail = detail.mail
}
if (detail.telephone && detail.display_telephone) {
c.telephone = detail.telephone
}
bureau.push(c)
}
association.bureau = bureau
} else {