""" Router dependencies for organisation module Classes: - List: Description - Classes: Description Functions: - List: Description - Functions: Description """ from typing import Annotated from fastapi import HTTPException, Depends from src.database import db_dependency from src.organisation.models import Organisation as Org def get_org_model(db: db_dependency, org_id: int) -> type[Org]: org_model = db.query(Org).filter(Org.id == org_id).first() if org_model is None: raise HTTPException(status_code=404, detail="Organisation not found") return org_model org_model_dependency = Annotated[type[Org], Depends(get_org_model)]