From 83e823f70665b45d34bbbe6871d2e839c4984752 Mon Sep 17 00:00:00 2001 From: Lukas Barragan Torres Date: Mon, 26 Feb 2024 20:47:28 +0100 Subject: [PATCH] foutief teacher i.p.v subject --- backend/db/implementation/SqlVakDAO.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/db/implementation/SqlVakDAO.py b/backend/db/implementation/SqlVakDAO.py index 58781922..f806f9b1 100644 --- a/backend/db/implementation/SqlVakDAO.py +++ b/backend/db/implementation/SqlVakDAO.py @@ -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()