From 73f08f9cb0e9dbcf49b9639c89df9830200875a6 Mon Sep 17 00:00:00 2001 From: Eden Kirin Date: Sun, 27 Aug 2023 13:36:35 +0200 Subject: [PATCH] Cleanup --- app/controllers/machine.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/machine.py b/app/controllers/machine.py index 0092213..132af09 100644 --- a/app/controllers/machine.py +++ b/app/controllers/machine.py @@ -13,7 +13,6 @@ from app.domain.machine import ( Repository, Service, ) -from app.lib.filters import ExactFilter from app.lib.responses import ObjectListResponse, ObjectResponse if TYPE_CHECKING: @@ -26,6 +25,7 @@ DETAIL_ROUTE = "/{machine_id:int}" async def provides_service(db_session: AsyncSession, company_id: int) -> Service: """Constructs repository and service objects for the request.""" from app.controllers.company import provides_service + company_service = provides_service(db_session) company = await company_service.get(company_id) return Service(Repository(session=db_session, company=company)) @@ -33,6 +33,7 @@ async def provides_service(db_session: AsyncSession, company_id: int) -> Service async def get_company(db_session: AsyncSession, company_id: int) -> Company: from app.controllers.company import provides_service + company_service = provides_service(db_session) return await company_service.get(company_id)