From 90c1454b2172dc6dfd95b34d39e623bde891dcad Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Tue, 4 Jul 2023 23:33:31 +0200 Subject: [PATCH] =?UTF-8?q?Robustifie=20code=20effacement=20d=C3=A9cision?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/but/jury_but.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/but/jury_but.py b/app/but/jury_but.py index 02f18dffa..fc4faf20e 100644 --- a/app/but/jury_but.py +++ b/app/but/jury_but.py @@ -865,11 +865,16 @@ class DecisionsProposeesAnnee(DecisionsProposees): self.etud.id, self.formsemestre.id ) for dec_ue in self.decisions_ues.values(): - if dec_ue.formsemestre.id == self.formsemestre.id: + if ( + dec_ue + and self.formsemestre + and dec_ue.formsemestre.id == self.formsemestre.id + ): dec_ue.erase() else: for dec_ue in self.decisions_ues.values(): - dec_ue.erase() + if dec_ue: + dec_ue.erase() if self.formsemestre_impair: ScolarAutorisationInscription.delete_autorisation_etud(