[gest_crans_lc] Ajout des validate_changes() même là où ça sert à rien
Pour ne pas avoir de surprise si quelqu'un modifie validate_changes() dans lc_ldap.
This commit is contained in:
parent
f53fd86fba
commit
acd7d8fd7f
5 changed files with 22 additions and 0 deletions
|
@ -212,6 +212,7 @@ class Dialog(proprio.Dialog):
|
|||
adherent["controle"]=unicode(adherent["controle"][0]).replace('c','')
|
||||
if not adherent["controle"][0]:
|
||||
adherent["controle"] = []
|
||||
adherent.validate_changes()
|
||||
adherent.history_gen()
|
||||
adherent.save()
|
||||
# On s'en va en mettant à jour dans la continuation la valeur de obj
|
||||
|
@ -391,6 +392,7 @@ class Dialog(proprio.Dialog):
|
|||
text_bottom=u"\nPasser la chambre de cet adhérent en chambre inconnue ?"
|
||||
):
|
||||
squatteur['chbre']=u'????'
|
||||
squatteur.validate_changes()
|
||||
squatteur.history_gen()
|
||||
squatteur.save()
|
||||
return True
|
||||
|
@ -419,6 +421,7 @@ class Dialog(proprio.Dialog):
|
|||
else:
|
||||
with self.conn.search(dn=adherent.dn, scope=0, mode='rw')[0] as adherent:
|
||||
adherent = set_chambre(adherent, chbre)
|
||||
adherent.validate_changes()
|
||||
adherent.history_gen()
|
||||
adherent.save()
|
||||
self.display_item(item=adherent, title="Adhérent déménagé dans la chambre %s" % output)
|
||||
|
@ -458,6 +461,7 @@ class Dialog(proprio.Dialog):
|
|||
with self.conn.search(dn=adherent.dn, scope=0, mode='rw')[0] as adherent:
|
||||
adherent['postalAddress']=[unicode(pa, 'utf-8') for pa in output]
|
||||
adherent['chbre']=u'EXT'
|
||||
adherent.validate_changes()
|
||||
adherent.history_gen()
|
||||
adherent.save()
|
||||
self.display_item(item=adherent, title="Adhérent déménégé hors campus, machines conservées")
|
||||
|
@ -485,6 +489,7 @@ class Dialog(proprio.Dialog):
|
|||
with machine:
|
||||
machine.delete()
|
||||
adherent['chbre']=u'EXT'
|
||||
adherent.validate_changes()
|
||||
adherent.history_gen()
|
||||
adherent.save()
|
||||
self.display_item(item=adherent, title="Adhérent déménégé hors campus, machines supprimées")
|
||||
|
@ -513,6 +518,7 @@ class Dialog(proprio.Dialog):
|
|||
with machine:
|
||||
machine.delete()
|
||||
adherent['chbre']=u'EXT'
|
||||
adherent.validate_changes()
|
||||
adherent.history_gen()
|
||||
adherent.save()
|
||||
# On supprime le compte crans (on essaye)
|
||||
|
@ -638,6 +644,7 @@ class Dialog(proprio.Dialog):
|
|||
# Les vérifications de sécurité sont faites dans lc_ldap
|
||||
with self.conn.search(dn=adherent.dn, scope=0, mode='rw')[0] as adherent:
|
||||
adherent['droits']=[unicode(d) for d in droits]
|
||||
adherent.validate_changes()
|
||||
adherent.history_gen()
|
||||
adherent.save()
|
||||
if adherent["uid"] and adherent["uid"][0] == self.conn.current_login:
|
||||
|
@ -863,6 +870,7 @@ class Dialog(proprio.Dialog):
|
|||
if not adherent["etudes"] or adherent["etudes"][0] != etablissement or adherent["etudes"][1] != annee or adherent["etudes"][2] != section:
|
||||
with self.conn.search(dn=adherent.dn, scope=0, mode='rw')[0] as adherent:
|
||||
adherent["etudes"]=[unicode(etablissement), unicode(annee), unicode(section)]
|
||||
adherent.validate_changes()
|
||||
adherent.history_gen()
|
||||
adherent.save()
|
||||
raise Continue(cont(adherent=adherent))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue