[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"""
|
"""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
|
||||||
for paiement in self['paiement']:
|
try:
|
||||||
if paiement.value == config.ann_scol:
|
for paiement in self['paiement']:
|
||||||
return True
|
if paiement.value == config.ann_scol:
|
||||||
|
return True
|
||||||
|
except KeyError:
|
||||||
|
pass
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue