判断题bug

This commit is contained in:
caoqianming 2020-03-09 11:15:08 +08:00
parent 7a13275eea
commit 6b424dd1f6
2 changed files with 2 additions and 2 deletions

View File

@ -101,7 +101,7 @@ function tmsubmitForm(){
tmdata['type'] = 3
$.ajax({
type: "POST",
url: 'api/question?a=add',
url: 'api/question?a=edit',
data: JSON.stringify(tmdata),
datatype: "json",
processData: false,

View File

@ -5697,7 +5697,7 @@ def apiquestion(req):
type = data['type']
level = data['level']
title = data['title']
if a == 'add':
if a == 'add' and 'id' in data and data['id']:
obj = Question()
else:
obj = Question.objects.get(id=data['id'])