[lc_ldap] On laisse un sursis d'une semaine après paiement avant de déconnecter pour carte étudiant après le 01/11
This commit is contained in:
parent
9963e7cf4c
commit
3c22c3c75e
1 changed files with 7 additions and 2 deletions
|
@ -463,8 +463,13 @@ class CransLdapObject(object):
|
|||
# blacklistes virtuelle si on est un adhérent pour carte étudiant et chambre invalides
|
||||
if self.__class__.__name__ == "adherent" and self.paiement_ok():
|
||||
if not config.periode_transitoire and config.bl_carte_et_actif and not self.carte_ok():
|
||||
for h in self['historique'][::-1]:
|
||||
x=re.match("(.*),.* : .*paiement\+%s.*" % config.ann_scol,h.value)
|
||||
if x != None:
|
||||
if (time.time()-time.mktime(time.strptime(x.group(1),'%d/%m/%Y %H:%M')))>config.sursis_carte:
|
||||
bl = blacklist(u'%s$%s$%s$%s' % ('-', '-', 'carte_etudiant', ''), {}, self.conn, False)
|
||||
blacklist_liste.append(bl)
|
||||
break
|
||||
if self['chbre'][0].value == '????':
|
||||
bl = blacklist(u'%s$%s$%s$%s' % ('-', '-', 'chambre_invalide', ''), {}, self.conn, False)
|
||||
blacklist_liste.append(bl)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue