BUG: Ne crash plus si maiden_name est vide dans les registres

This commit is contained in:
Sdj Geek 2020-07-30 12:01:48 +02:00
parent 35fbec4fff
commit 88a94c6983
1 changed files with 3 additions and 1 deletions

View File

@ -45,7 +45,9 @@ class SiteEglise(MembreProvider):
def complete(self): def complete(self):
if not self.completed: if not self.completed:
member_profile = self.provider.get_member_profile(self.r_id) 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'] self.r_ville = member_profile['individual']['birthPlace']
if not self.r_ville: if not self.r_ville:
self.r_ville = "<VIDE>" self.r_ville = "<VIDE>"