diff --git a/journals/models.py b/journals/models.py index cfd4cda..d033516 100755 --- a/journals/models.py +++ b/journals/models.py @@ -785,7 +785,7 @@ class HomeworkJ(models.Model): elif _type == 'E': obj = ExamJ - j = obj.objects.get(material=_next, student=self.student) + j = obj.objects.get_or_create(material=_next, student=self.student) if self.success: j.open_material() return {'button': search_in_collection(BUTTON_TYPE,