2me changement annonc dans le dernier commit fait

darcs-hash:20040914210854-41617-787d7de3e75121332be978ae2f66e29d215a5021.gz
This commit is contained in:
pauget 2004-09-14 23:08:54 +02:00
parent 8de44976c5
commit 2a26dcfc16

View file

@ -129,15 +129,13 @@ exit
def configure_chbre(self,chbre) : def configure_chbre(self,chbre) :
""" Recontigure la chambre fournie chambre """ """ Recontigure la chambre fournie chambre """
bat = chbre[0].lower() bat = chbre[0].lower()
a = self.db.search('chbre=%s' % chbre) a = self.db.search('chbre=%s&paiement=%i' % (chbre,ann_scol))
action = '' a = a['adherent'] + a['club']
for proprio in a['adherent'] + a['club'] : if a and 'bloq' not in a[0].blacklist_actif() :
if (((ann_scol in proprio.paiement()) or ((ann_scol-1) in proprio.paiement() and localtime()[1]==9)) and 'bloq' not in proprio.blacklist_actif()) : # Il faut activer la prise
# Il faut activer la prise anim('\tactivation chbre %s' % chbre)
anim('\tactivation chbre %s' % chbre) action = 'enable'
action = 'enable' else :
break
if action == '' :
# Il faut désactiver la prise # Il faut désactiver la prise
anim('\tdésactivation chbre %s' % chbre) anim('\tdésactivation chbre %s' % chbre)
action = 'disable' action = 'disable'