diff --git "a/\357\200\272q" "b/\357\200\272q" deleted file mode 100644 index 857f1b12999c9d60ec1372e3ad115c7b9fdecbd4..0000000000000000000000000000000000000000 --- "a/\357\200\272q" +++ /dev/null @@ -1,24 +0,0 @@ -[1mdiff --git a/zesje/api/feedback.py b/zesje/api/feedback.py[m -[1mindex 0ed472b..686afb5 100644[m -[1m--- a/zesje/api/feedback.py[m -[1m+++ b/zesje/api/feedback.py[m -[36m@@ -140,14 +140,11 @@[m [mclass Feedback(Resource):[m - db.session.commit()[m - [m - # Delete mc_options associated with this feedback option[m -[31m- if fb.mc_option:[m -[32m+[m[32m if fb.mc_option and fb.problem.exam.finalized:[m -[32m+[m[32m return dict(status=401, message='Cannot delete feedback option'[m -[32m+[m[32m + ' attached to a multiple choice option in a finalized exam.'), 401[m - [m -[31m- # Check if the exam with this feedback option[m -[31m- if fb.problem.exam.finalized:[m -[31m- return dict(status=401, message='Cannot delete feedback option'[m -[31m- + ' attached to a multiple choice option in a finalized exam.'), 401[m -[31m-[m -[31m- db.session.delete(fb.mc_option)[m -[31m- db.session.commit()[m -[32m+[m[32m db.session.delete(fb.mc_option)[m -[32m+[m[32m db.session.commit()[m - [m - return dict(status=200, message=f"Feedback option with id {feedback_id} deleted."), 200[m