Skip to content

Commit

Permalink
fix wrongly initialized repository flag
Browse files Browse the repository at this point in the history
  • Loading branch information
dmytropolityka committed Jul 26, 2024
1 parent 058968a commit ae65738
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions athena/athena/schemas/feedback.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ class Feedback(Schema, ABC):
exercise_id: int = Field(example=1)
submission_id: int = Field(example=1)

def to_model(self, is_suggestion: bool = False, lms_id: Optional[int] = None):
return type(self).get_model_class()(**self.dict(), is_suggestion=is_suggestion, lms_id=lms_id)
def to_model(self, is_suggestion: bool = False, lms_id: Optional[int] = None, lms_url: Optional[str] = None):
return type(self).get_model_class()(**self.dict(), is_suggestion=is_suggestion, lms_id=lms_id, lms_url=lms_url)

class Config:
orm_mode = True
2 changes: 1 addition & 1 deletion athena/athena/storage/feedback_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def store_feedback(feedback: Feedback, is_lms_id=False, lms_url: Optional[str] =
lms_url=lms_url).scalar()
feedback.id = internal_id

stored_feedback_model = db.merge(feedback.to_model(lms_id=lms_id))
stored_feedback_model = db.merge(feedback.to_model(lms_id=lms_id, lms_url=lms_url))
db.commit()
return stored_feedback_model.to_schema()

Expand Down

0 comments on commit ae65738

Please sign in to comment.