Exam deletion returns 500 error
Might be related to #243 (closed).
This is from the current master branch. Trying to delete an exam in creation:
Pressing 'Delete exam' doesn't close the popup menu and gives me an error 500:
Request URL:http://localhost:8881/api/exams/3
Request method:DELETE
Remote address:127.0.0.1:8881
Status code:
500
Version:HTTP/1.1
Referrer Policy:no-referrer-when-downgrade
Pressing 'Delete exam' a second time also gives the following flask output (truncated):
[PYTHON] File "/home/hidde/zesje/zesje/api/exams.py", line 43, in delete
[PYTHON] exam.delete()
[PYTHON] AttributeError: 'Exam' object has no attribute 'delete'
[PYTHON] 127.0.0.1 - - [15/May/2019 18:00:28] "DELETE /api/exams/3 HTTP/1.1" 500 -
I confirmed this behavior with @jtimotei