I am bad at debugging.

This commit is contained in:
Vivek Santayana 2021-12-06 23:19:13 +00:00
parent cc45bf7acd
commit 7b2a2ce90c

View File

@ -418,7 +418,7 @@ def delete_test():
@views.route('/tests/close/', methods=['POST']) @views.route('/tests/close/', methods=['POST'])
@admin_account_required @admin_account_required
@login_required @login_required
def delete_test(): def close_test():
from main import db from main import db
_id = request.get_json()['_id'] _id = request.get_json()['_id']
if db.tests.find_one_and_update({'_id': _id}, {'$set': {'expiry_date': datetime.today() - timedelta(days=1) }}): if db.tests.find_one_and_update({'_id': _id}, {'$set': {'expiry_date': datetime.today() - timedelta(days=1) }}):