From 88a94c698351a1374d3acfaf20ba7d4b6b99daaf Mon Sep 17 00:00:00 2001 From: Sdj GeeK Date: Thu, 30 Jul 2020 12:01:48 +0200 Subject: [PATCH] BUG: Ne crash plus si maiden_name est vide dans les registres --- purge-registres-deces-insee/site_eglise.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 = ""