Commentaires dans CPS, à étoffer un peu. Et léger typofix.
This commit is contained in:
parent
890a1067fc
commit
ef07bc5a28
2 changed files with 116 additions and 59 deletions
|
@ -723,19 +723,19 @@ class Dialog(proprio.Dialog):
|
|||
def set_chambre(adherent, chbre):
|
||||
try:
|
||||
adherent['postalAddress'] = []
|
||||
adherent['chbre'] = unicode(output, 'utf-8')
|
||||
adherent['chbre'] = unicode(chbre, 'utf-8')
|
||||
except UniquenessError:
|
||||
if expulse_squatteur(adherent, chbre):
|
||||
# La chambre est maintenant normalement libre
|
||||
adherent['chbre'] = unicode(output, 'utf-8')
|
||||
adherent['chbre'] = unicode(chbre, 'utf-8')
|
||||
else:
|
||||
raise Continue(self_cont)
|
||||
return adherent
|
||||
|
||||
def todo(chbre, adherent, self_cont, success_cont):
|
||||
if not output:
|
||||
if not chbre:
|
||||
raise Continue(self_cont)
|
||||
if output == "????":
|
||||
if chbre == "????":
|
||||
raise ValueError("Chambre ???? invalide")
|
||||
if create:
|
||||
return set_chambre(adherent, chbre)
|
||||
|
@ -745,7 +745,7 @@ class Dialog(proprio.Dialog):
|
|||
adherent.validate_changes()
|
||||
adherent.history_gen()
|
||||
adherent.save()
|
||||
self.display_item(item=adherent, title="Adhérent déménagé dans la chambre %s" % output)
|
||||
self.display_item(item=adherent, title="Adhérent déménagé dans la chambre %s" % chbre)
|
||||
raise Continue(success_cont(adherent=adherent))
|
||||
|
||||
(code, output) = self.handle_dialog(cont, box)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue