判断题bug
This commit is contained in:
parent
7a13275eea
commit
6b424dd1f6
|
@ -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,
|
||||
|
|
|
@ -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'])
|
||||
|
|
Loading…
Reference in New Issue