]> git.parisson.com Git - teleforma.git/commitdiff
Avoir crash when user is empty : https://trackers.pilotsystems.net/prebarreau/0351
authorYoan Le Clanche <yoanl@pilotsystems.net>
Wed, 26 Jan 2022 17:01:49 +0000 (18:01 +0100)
committerYoan Le Clanche <yoanl@pilotsystems.net>
Wed, 26 Jan 2022 17:01:49 +0000 (18:01 +0100)
teleforma/exam/views.py

index 8eb464f9143908ee8f6a2ef1367cd85757a50ca1..4fda97aa29fc7ede0fc16cdca7f19bb94c9c011a 100755 (executable)
@@ -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)