Skip to content
Snippets Groups Projects
Commit 3e15bec9 authored by Ruben Young On's avatar Ruben Young On
Browse files

MultipleChoiceOption is now deleted if the related FeedbackOption is deleted

parent 3ad2ab41
No related branches found
No related tags found
1 merge request!12Fix relation between MultipleChoiceOption and FeedbackOption
Pipeline #17720 passed
This commit is part of merge request !12. Comments created here will be created in the context of that merge request.
......@@ -138,3 +138,10 @@ class Feedback(Resource):
solution.graded_at = None
db.session.commit()
# Delete mc_options associated with this feedback option
if fb.mc_option:
db.session.delete(fb.mc_option)
db.session.commit()
return dict(status=200, message=f"Feedback option with id {feedback_id} deleted."), 200
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment