判断题bug
This commit is contained in:
parent
7a13275eea
commit
6b424dd1f6
|
@ -101,7 +101,7 @@ function tmsubmitForm(){
|
||||||
tmdata['type'] = 3
|
tmdata['type'] = 3
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: 'api/question?a=add',
|
url: 'api/question?a=edit',
|
||||||
data: JSON.stringify(tmdata),
|
data: JSON.stringify(tmdata),
|
||||||
datatype: "json",
|
datatype: "json",
|
||||||
processData: false,
|
processData: false,
|
||||||
|
|
|
@ -5697,7 +5697,7 @@ def apiquestion(req):
|
||||||
type = data['type']
|
type = data['type']
|
||||||
level = data['level']
|
level = data['level']
|
||||||
title = data['title']
|
title = data['title']
|
||||||
if a == 'add':
|
if a == 'add' and 'id' in data and data['id']:
|
||||||
obj = Question()
|
obj = Question()
|
||||||
else:
|
else:
|
||||||
obj = Question.objects.get(id=data['id'])
|
obj = Question.objects.get(id=data['id'])
|
||||||
|
|
Loading…
Reference in New Issue