diff --git a/lc_ldap.py b/lc_ldap.py index 5037c88..5d45f47 100644 --- a/lc_ldap.py +++ b/lc_ldap.py @@ -453,13 +453,23 @@ class proprio(CransLdapObject): """Renvoie si le propriétaire à payé pour l'année en cours""" if self.dn == base_dn: return True + bool_paiement = False try: for paiement in self['paiement']: if paiement.value == config.ann_scol: - return True + bool_paiement = True except KeyError: pass - return False + if config.bl_carte_et_definitif: + bool_carte = False + try: + for carte in self['carteEtudiant']: + if carte.value == config.ann_scol: + bool_carte = True + except KeyError: + pass + return bool_carte and bool_paiement + return bool_paiement