[lc_ldap] On n'oublie pas que 'paiement' est un champs optionnel
This commit is contained in:
parent
2459e40531
commit
b697fdf94f
1 changed files with 6 additions and 3 deletions
|
@ -453,9 +453,12 @@ class proprio(CransLdapObject):
|
|||
"""Renvoie si le propriétaire à payé pour l'année en cours"""
|
||||
if self.dn == base_dn:
|
||||
return True
|
||||
try:
|
||||
for paiement in self['paiement']:
|
||||
if paiement.value == config.ann_scol:
|
||||
return True
|
||||
except KeyError:
|
||||
pass
|
||||
return False
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue