导入question
This commit is contained in:
parent
16fb63aa79
commit
82ed58a50b
|
@ -95,7 +95,7 @@ def drquestions(companyid,path,userid):
|
|||
cateobj = Questioncat.objects.create(usecomp=Partment.objects.get(partid=companyid),name=cate)
|
||||
print(cateobj)
|
||||
if type == '单选':
|
||||
if Question.objects.filter(type=1,title=title,right=right,deletemark=1).exists():
|
||||
if Question.objects.filter(type=1,title=title,right=right,deletemark=1,usecomps = ','+companyid+',').exists():
|
||||
notinlist.append(i)
|
||||
else:
|
||||
if right in ['A','B','C','D','E','F']:
|
||||
|
@ -115,7 +115,7 @@ def drquestions(companyid,path,userid):
|
|||
obj.save()
|
||||
elif type == '多选':
|
||||
right = list(right)
|
||||
if Question.objects.filter(type=2,title=title,right=right,deletemark=1).exists():
|
||||
if Question.objects.filter(type=2,title=title,right=right,deletemark=1,usecomps = ','+companyid+',').exists():
|
||||
notinlist.append(i)
|
||||
else:
|
||||
if [False for c in right if c not in qlist]:
|
||||
|
@ -140,7 +140,7 @@ def drquestions(companyid,path,userid):
|
|||
right = 'A'
|
||||
else:
|
||||
right = 'B'
|
||||
if Question.objects.filter(type=3,title=title,right=right,deletemark=1).exists():
|
||||
if Question.objects.filter(type=3,title=title,right=right,deletemark=1,usecomps = ','+companyid+',').exists():
|
||||
notinlist.append(i)
|
||||
else:
|
||||
obj = Question()
|
||||
|
|
Loading…
Reference in New Issue