From: Yoan Le Clanche Date: Wed, 26 Jan 2022 17:01:49 +0000 (+0100) Subject: Avoir crash when user is empty : https://trackers.pilotsystems.net/prebarreau/0351 X-Git-Tag: 2.5.1~8^2 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=338830082f3beae4e42e6bdbb4279ed849a313b7;p=teleforma.git Avoir crash when user is empty : https://trackers.pilotsystems.net/prebarreau/0351 --- diff --git a/teleforma/exam/views.py b/teleforma/exam/views.py index 8eb464f9..4fda97aa 100755 --- a/teleforma/exam/views.py +++ b/teleforma/exam/views.py @@ -517,7 +517,10 @@ class MassScoreCreateView(ScoreCreateView): res = [] for student in students: - user = student.user + try: + user = student.user + except User.DoesNotExist: + continue # FIXME : Filter those who access the course, but that's very slow, # so I disable it for now - we'll see if we can do that faster later # courses = get_courses(user)