Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Commit

Permalink
foutief teacher i.p.v subject
Browse files Browse the repository at this point in the history
  • Loading branch information
lbarraga committed Feb 26, 2024
1 parent c797be4 commit 83e823f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions backend/db/implementation/SqlVakDAO.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ def create_subject(self, subject: SubjectDataclass, teacher_id: int) -> None:

subject.id = new_subject.id

def get_subject(self, teacher_id: int) -> SubjectDataclass:
subject = Subject.query.get(teacher_id)
def get_subject(self, subject_id: int) -> SubjectDataclass:
subject = Subject.query.get(subject_id)
if not subject:
msg = f"De lesgever met id {teacher_id} kon niet in de databank gevonden worden"
msg = f"Het vak met id {subject_id} kon niet in de databank gevonden worden"
raise ItemNotFoundError(msg)

return subject.to_domain_model()
Expand Down

0 comments on commit 83e823f

Please sign in to comment.