From 54c53877dc49cc7ec65ca99a1cff28ede2c4902d Mon Sep 17 00:00:00 2001 From: Romain Beuque Date: Wed, 17 Sep 2014 00:58:41 +0200 Subject: [PATCH] =?UTF-8?q?[registration]=20en=20cas=20d'absence=20de=20ma?= =?UTF-8?q?c,=20l'ajout=20de=20la=20cotisation=20n'=C3=A9tait=20pas=20pris?= =?UTF-8?q?=20en=20compte?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Brie/brie/controllers/registration.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Brie/brie/controllers/registration.py b/Brie/brie/controllers/registration.py index 9ca0f0f..8a287c0 100644 --- a/Brie/brie/controllers/registration.py +++ b/Brie/brie/controllers/registration.py @@ -191,14 +191,25 @@ class NewRegistrationController(AuthenticatedRestController): if room_uid != "": self.member_edit_controller.room.move.post(residence, member_uid, room_uid, erase = True, go_redirect = False) #end if + + trigerErreur = False try: self.member_edit_controller.machine.add.post(residence, member_uid, first_machine_name, first_machine_mac, go_redirect = False) + except: + trigerErreur = True + try: self.member_edit_controller.cotisation.add.post(residence, member_uid, next_end, extra_name, go_redirect = False) + except: + trigerErreur = True + try: if group_cn != "": self.administration_controller.groups.add_member.post(group_cn, member.dn, go_redirect = False) #end if except: - redirect("/registration/error/" + member_uid) + trigerErreur = True + + if trigerErreur: + redirect("/registration/error/" + member_uid) redirect("/registration/")