always extract ic_equipe_recherche and ic_unite_fonctionnelle (#11029)

This commit is contained in:
Benjamin Dauvergne 2016-05-26 13:52:51 +02:00
parent c6f6a2f607
commit 301918c0a9
1 changed files with 15 additions and 16 deletions

View File

@ -139,22 +139,21 @@ class CurieLdifParser(ldif.LDIFParser):
supann_entite_affectation = []
supann_entite_affectation_principale = []
if entry.get('iclibelleentite', []) == ['Recherche']:
try:
ic_equipe_recherche = self.assert_sv_attribute(entry, 'icequiperecherche')
except AssertionError, e:
self.errors.append(Error(dn, str(e)))
else:
ou = self.extract_top_rdn(ic_equipe_recherche)
supann_entite_affectation.append(ou)
supann_entite_affectation_principale.append(ou)
try:
ic_unite_fonctionnelle = self.assert_sv_attribute(entry, 'icunitefonctionnelle')
except AssertionError, e:
self.errors.append(Error(dn, str(e)))
else:
ou = self.extract_top_rdn(ic_unite_fonctionnelle)
supann_entite_affectation.append(ou)
try:
ic_equipe_recherche = self.assert_sv_attribute(entry, 'icequiperecherche')
except AssertionError, e:
self.errors.append(Error(dn, str(e)))
else:
ou = self.extract_top_rdn(ic_equipe_recherche)
supann_entite_affectation.append(ou)
supann_entite_affectation_principale.append(ou)
try:
ic_unite_fonctionnelle = self.assert_sv_attribute(entry, 'icunitefonctionnelle')
except AssertionError, e:
self.errors.append(Error(dn, str(e)))
else:
ou = self.extract_top_rdn(ic_unite_fonctionnelle)
supann_entite_affectation.append(ou)
supann_civilite = []
if entry.get('icsexe', []) == ['M']:
supann_civilite = ['M.']