Commit 11ef91a2 authored by Bruno Martin's avatar Bruno Martin
Browse files

Merge branch 'develop'

parents 2dabc90d 236a6eee
......@@ -359,6 +359,8 @@ class CourseStudent(models.Model):
def get_current_class(self):
return Class.objects.get(students=self.user, course=self.course)
except Class.MultipleObjectsReturned:
return Class.objects.filter(students=self.user, course=self.course).first()
except Class.DoesNotExist:
return self.course.default_class
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment