[lc_ldap] On mets paiement_ok à False si config.bl_carte_et_definitif est actif
This commit is contained in:
parent
60ef6f2a50
commit
66a1eb2fb5
1 changed files with 12 additions and 2 deletions
14
lc_ldap.py
14
lc_ldap.py
|
@ -453,13 +453,23 @@ class proprio(CransLdapObject):
|
||||||
"""Renvoie si le propriétaire à payé pour l'année en cours"""
|
"""Renvoie si le propriétaire à payé pour l'année en cours"""
|
||||||
if self.dn == base_dn:
|
if self.dn == base_dn:
|
||||||
return True
|
return True
|
||||||
|
bool_paiement = False
|
||||||
try:
|
try:
|
||||||
for paiement in self['paiement']:
|
for paiement in self['paiement']:
|
||||||
if paiement.value == config.ann_scol:
|
if paiement.value == config.ann_scol:
|
||||||
return True
|
bool_paiement = True
|
||||||
except KeyError:
|
except KeyError:
|
||||||
pass
|
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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue