Removed todo tags
This commit is contained in:
parent
6d5f74bd62
commit
76fa1e1dd9
@ -77,7 +77,7 @@ $('.test-action').click(function(event) {
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
url: `/admin/tests/edit/`,
|
url: `/admin/tests/edit/`,
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
data: JSON.stringify({'id': id, 'action': action}), // TODO Change how CRUD operations work
|
data: JSON.stringify({'id': id, 'action': action}),
|
||||||
contentType: 'application/json',
|
contentType: 'application/json',
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
window.location.href = '/admin/tests/';
|
window.location.href = '/admin/tests/';
|
||||||
|
@ -214,7 +214,7 @@ def _questions():
|
|||||||
if form.validate_on_submit():
|
if form.validate_on_submit():
|
||||||
upload = form.data_file.data
|
upload = form.data_file.data
|
||||||
if not check_is_json(upload): return jsonify({'error': 'Invalid file. Please upload a JSON file.'}), 400
|
if not check_is_json(upload): return jsonify({'error': 'Invalid file. Please upload a JSON file.'}), 400
|
||||||
if not validate_json(upload): return jsonify({'error': 'The data in the file is invalid.'}), 400 # TODO Perhaps make a more complex validation script
|
if not validate_json(upload): return jsonify({'error': 'The data in the file is invalid.'}), 400
|
||||||
new_dataset = Dataset()
|
new_dataset = Dataset()
|
||||||
success, message = new_dataset.create(
|
success, message = new_dataset.create(
|
||||||
upload = upload,
|
upload = upload,
|
||||||
|
Loading…
Reference in New Issue
Block a user