From 7628425ec2f3c34be8170c171229dfc5e99fbaba Mon Sep 17 00:00:00 2001 From: Evgeniy Shabanov Date: Wed, 24 Jan 2018 16:21:58 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=BB=D1=83=D1=87=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5=20=D1=81=D0=BB=D0=B5=D0=B4=D1=83=D1=8E=D1=89=D0=B5?= =?UTF-8?q?=D0=B3=D0=BE=20=D0=BC=D0=B0=D1=82=D0=B5=D1=80=D0=B8=D0=B0=D0=BB?= =?UTF-8?q?=D0=B0=20=D0=BF=D0=BE=D1=81=D0=BB=D0=B5=20=D0=B4/=D0=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- journals/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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,