annuaires: vire mentions câblage crans-crous
This commit is contained in:
parent
2bcce4911f
commit
8c8ac24c54
3 changed files with 3 additions and 55 deletions
|
@ -1991,31 +1991,8 @@ class BaseProprietaire(BaseClasseCrans):
|
|||
self.services_to_restart('bl_chbre_invalide')
|
||||
|
||||
if ('chbre' in self.modifs or 'paiement' in self.modifs) and self._data['chbre'][0] not in ("????", "EXT"):
|
||||
while True:
|
||||
bat = self._data['chbre'][0][0]
|
||||
ch = self._data['chbre'][0][1:]
|
||||
if annuaires.is_crans(bat, ch):
|
||||
break
|
||||
else:
|
||||
r = prompt(u"La chambre %s est câblée sur le réseau CROUS. Est-ce *bien* la chambre de l'adhérent ? [O/N]" % self._data['chbre'][0], "O")
|
||||
if r == 'O' or r == 'o':
|
||||
annuaires.crous_to_crans(bat, ch)
|
||||
else:
|
||||
while True:
|
||||
new_ch = prompt(u"Chambre de l'adhérent ?")
|
||||
try:
|
||||
self.chbre(new_ch)
|
||||
except ValueError, c:
|
||||
if len(c.args) == 2:
|
||||
old_adh = c.args[1]
|
||||
r = prompt(u"Changer %s de chambre ? [O/N]" % old_adh.Nom(), "n")
|
||||
if r == 'O' or r == 'o':
|
||||
old_adh.chbre('????')
|
||||
old_adh.save()
|
||||
self.chbre(new_ch)
|
||||
break
|
||||
else:
|
||||
break
|
||||
bat = self._data['chbre'][0][0]
|
||||
ch = self._data['chbre'][0][1:]
|
||||
|
||||
# Enregistrement
|
||||
self._save()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue