Merge branch 'master' of https://e.coding.net/ctcdevteam/safesite
This commit is contained in:
commit
c932ecd95c
|
@ -93,10 +93,9 @@ def drquestions(companyid,path,userid):
|
|||
cateobj = objs[0]
|
||||
else:
|
||||
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,usecomps = ','+companyid+',').exists():
|
||||
notinlist.append(i)
|
||||
Question.objects.filter(type=1,title=title,right=right,deletemark=1,usecomps = ','+companyid+',').update(nousecomps='')
|
||||
else:
|
||||
if right in ['A','B','C','D','E','F']:
|
||||
obj = Question()
|
||||
|
@ -116,7 +115,7 @@ def drquestions(companyid,path,userid):
|
|||
elif type == '多选':
|
||||
right = list(right)
|
||||
if Question.objects.filter(type=2,title=title,right=right,deletemark=1,usecomps = ','+companyid+',').exists():
|
||||
notinlist.append(i)
|
||||
Question.objects.filter(type=2,title=title,right=right,deletemark=1,usecomps = ','+companyid+',').update(nousecomps='')
|
||||
else:
|
||||
if [False for c in right if c not in qlist]:
|
||||
pass
|
||||
|
@ -141,7 +140,7 @@ def drquestions(companyid,path,userid):
|
|||
else:
|
||||
right = 'B'
|
||||
if Question.objects.filter(type=3,title=title,right=right,deletemark=1,usecomps = ','+companyid+',').exists():
|
||||
notinlist.append(i)
|
||||
Question.objects.filter(type=3,title=title,right=right,deletemark=1,usecomps = ','+companyid+',').update(nousecomps='')
|
||||
else:
|
||||
obj = Question()
|
||||
obj.type = 3
|
||||
|
@ -158,7 +157,6 @@ def drquestions(companyid,path,userid):
|
|||
obj.createuser = user
|
||||
obj.save()
|
||||
i = i +1
|
||||
print(notinlist)
|
||||
return notinlist
|
||||
|
||||
def drtodotroubles(companyid,path,userid):
|
||||
|
|
Loading…
Reference in New Issue