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

Added relationship between mc_option and feedbackoption, problem_id is no longer used

parent 8507d35e
No related branches found
No related tags found
1 merge request!12Fix relation between MultipleChoiceOption and FeedbackOption
Pipeline #17703 failed
This commit is part of merge request !12. Comments created here will be created in the context of that merge request.
......@@ -110,6 +110,7 @@ class FeedbackOption(db.Model):
text = Column(Text, nullable=False)
description = Column(Text, nullable=True)
score = Column(Integer, nullable=True)
mc_option = db.relationship('MultipleChoiceOption', backref='feedback', lazy=True)
# Table for many to many relationship of FeedbackOption and Solution
......@@ -166,7 +167,6 @@ class MultipleChoiceOption(Widget):
id = Column(Integer, ForeignKey('widget.id'), primary_key=True, autoincrement=True)
label = Column(String, nullable=True)
problem_id = Column(Integer, ForeignKey('problem.id'), nullable=False)
feedback_id = Column(Integer, ForeignKey('feedback_option.id'), nullable=False)
__mapper_args__ = {
......
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