可重复考试bug

This commit is contained in:
caoqianming 2020-11-30 22:31:28 +08:00
parent 898c402a25
commit e1e84771fc
1 changed files with 3 additions and 0 deletions

View File

@ -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')