From 76fa1e1dd9bbc8a417a384f2a8b565e52d941b30 Mon Sep 17 00:00:00 2001 From: Vivek Santayana Date: Sun, 19 Jun 2022 11:17:21 +0100 Subject: [PATCH] Removed todo tags --- ref-test/app/admin/static/js/script.js | 2 +- ref-test/app/admin/views.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ref-test/app/admin/static/js/script.js b/ref-test/app/admin/static/js/script.js index 30c8a49..96004f9 100644 --- a/ref-test/app/admin/static/js/script.js +++ b/ref-test/app/admin/static/js/script.js @@ -77,7 +77,7 @@ $('.test-action').click(function(event) { $.ajax({ url: `/admin/tests/edit/`, 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', success: function(response) { window.location.href = '/admin/tests/'; diff --git a/ref-test/app/admin/views.py b/ref-test/app/admin/views.py index 65bb6f2..cfea08f 100644 --- a/ref-test/app/admin/views.py +++ b/ref-test/app/admin/views.py @@ -214,7 +214,7 @@ def _questions(): if form.validate_on_submit(): upload = form.data_file.data 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() success, message = new_dataset.create( upload = upload,