diff --git a/backend/db/extensions.py b/backend/db/extensions.py index ad57b51b..3b59d0cd 100644 --- a/backend/db/extensions.py +++ b/backend/db/extensions.py @@ -3,7 +3,6 @@ from fastapi_sqlalchemy import SQLAlchemy from sqlalchemy import create_engine - db_host = os.getenv("DB_HOST", "localhost") db_port = os.getenv("DB_PORT", "5432") db_user = os.getenv("DB_USERNAME", "postgres") diff --git a/backend/db/implementation/SqlSubjectDAO.py b/backend/db/implementation/SqlSubjectDAO.py index 388e0704..40e59f10 100644 --- a/backend/db/implementation/SqlSubjectDAO.py +++ b/backend/db/implementation/SqlSubjectDAO.py @@ -1,8 +1,8 @@ from db.errors.database_errors import ItemNotFoundError, UniqueConstraintError +from db.extensions import db from db.interface.SubjectDAO import SubjectDAO from db.models.models import Student, Subject, Teacher from domain.models.SubjectDataclass import SubjectDataclass -from db.extensions import db class SqlSubjectDAO(SubjectDAO): diff --git a/backend/db/implementation/SqlTeacherDAO.py b/backend/db/implementation/SqlTeacherDAO.py index 8f55ee5f..9623cb3e 100644 --- a/backend/db/implementation/SqlTeacherDAO.py +++ b/backend/db/implementation/SqlTeacherDAO.py @@ -1,8 +1,8 @@ from sqlalchemy import select from db.errors.database_errors import ItemNotFoundError -from db.interface.TeacherDAO import TeacherDAO from db.extensions import db +from db.interface.TeacherDAO import TeacherDAO from db.models.models import Teacher from domain.models.TeacherDataclass import TeacherDataclass