From e1e84771fc233c431e1d6770c08f02ffb4e141af Mon Sep 17 00:00:00 2001 From: caoqianming Date: Mon, 30 Nov 2020 22:31:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=AF=E9=87=8D=E5=A4=8D=E8=80=83=E8=AF=95bu?= =?UTF-8?q?g?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- safesite/views.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/safesite/views.py b/safesite/views.py index cd398aa9..3b1ca9d0 100644 --- a/safesite/views.py +++ b/safesite/views.py @@ -6388,6 +6388,9 @@ def apiexamtest(req): a['notinTime'] = 1 if 'endtime' in a and a['endtime'] < datetime.now(): a['notinTime'] = 1 + a['ison'] = 0 + if ExamTestDetail.objects.filter(examtest__id=id,user__userid=userid,ison=1).exists(): + a['ison'] = 1 return HttpResponse(json.dumps(a, cls=MyEncoder), content_type="application/json") elif a == 'detailtm': id = req.GET.get('id')