fix: 模拟考试完善出卷规则未完成

This commit is contained in:
caoqianming 2023-04-14 17:48:43 +08:00
parent bd885a935f
commit 53670db67b
1 changed files with 1 additions and 1 deletions

View File

@ -260,7 +260,7 @@ class WorkScopeViewSet(ModelViewSet):
ret['panduan_score'] = workscope.rule.panduan_score ret['panduan_score'] = workscope.rule.panduan_score
question_queryset = Question.objects.none() question_queryset = Question.objects.none()
questioncats = workscope.questioncat.exclude(name='辐射小知识更新中').order_by('type', 'create_time') questioncats = workscope.questioncat.exclude(name='辐射小知识更新中').order_by('type', 'create_time')
if questioncats.count() == 3: if questioncats.count() == 3 and questioncats.filter(name='电离辐射法律法规').exists():
import random import random
b2 = random.randint(1,8) b2 = random.randint(1,8)
b3 = random.randint(1,9-b2) b3 = random.randint(1,9-b2)