Spaces:
Runtime error
Runtime error
| from src.repositories import GateEvaluationRepository | |
| class GateEvaluationService: | |
| def __init__(self): | |
| self.repository = GateEvaluationRepository | |
| async def __aenter__(self): | |
| return self | |
| async def __aexit__(self, exc_type, exc_value, traceback): | |
| pass | |
| async def get_gate_evaluation(self, proposal_id: str = None, id: str = None): | |
| async with self.repository() as repository: | |
| return await repository.get_gate_evaluation(proposal_id=proposal_id, id=id) | |
| async def create_gate_evaluation(self, proposal_id: str, gate_evaluation: dict): | |
| async with self.repository() as repository: | |
| return await repository.create_gate_evaluation( | |
| proposal_id=proposal_id, gate_evaluation=gate_evaluation | |
| ) | |
| async def update_gate_evaluation( | |
| self, gate_evaluation: dict, proposal_id: str = None, id: str = None | |
| ): | |
| async with self.repository() as repository: | |
| return await repository.update_gate_evaluation( | |
| id=id, proposal_id=proposal_id, gate_evaluation=gate_evaluation | |
| ) | |
| async def delete_gate_evaluation(self, id: str = None, proposal_id: str = None): | |
| async with self.repository() as repository: | |
| return await repository.delete_gate_evaluation( | |
| id=id, proposal_id=proposal_id | |
| ) | |