Merge pull request #9016 from colinux/fix-dolist-sans-contact

Email (Dolist): pas d'erreur lorsqu'un mail n'a pas pu être envoyé vers un nouveau contact
This commit is contained in:
Colin Darie 2023-05-09 12:45:48 +00:00 committed by GitHub
commit 5a3cbcdb72
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -152,7 +152,11 @@ module Dolist
}
}.to_json
post(url, body)["FieldList"].find { _1['ID'] == 72 }['Value']
fields = post(url, body).fetch("FieldList", [])
return nil if fields.empty?
fields.find { _1['ID'] == 72 }.fetch('Value')
end
def ignorable_error?(response, mail)