diff --git a/purge-registres-deces-insee/site_eglise.py b/purge-registres-deces-insee/site_eglise.py index 9a69a3c..5a7c53b 100644 --- a/purge-registres-deces-insee/site_eglise.py +++ b/purge-registres-deces-insee/site_eglise.py @@ -45,7 +45,9 @@ class SiteEglise(MembreProvider): def complete(self): if not self.completed: member_profile = self.provider.get_member_profile(self.r_id) - self.r_maiden_name = member_profile['individual']['maidenNameGroup']['name1']['family'].strip().split(' ')[0].upper() + self.r_maiden_name = member_profile['individual']['maidenNameGroup']['name1']['family'] + if self.r_maiden_name is not None: + self.r_maiden_name = self.r_maiden_name.strip().split(' ')[0].upper() self.r_ville = member_profile['individual']['birthPlace'] if not self.r_ville: self.r_ville = ""