fix await error

main
Cizz22 1 year ago
parent bd0b87f2de
commit 9c81168647

@ -22,10 +22,10 @@ async def get_create_calculation_parameters(*, db_session: DbSession):
results = await db_session.execute(stmt)
costFailure = results.all()
avaiableScopes = {scope.id: scope.scope_name for scope in await get_all(db_session=db_session)}
scopes = await get_all(db_session=db_session)
avaiableScopes = {scope.id: scope.scope_name for scope in scopes}
costFailurePerScope = {avaiableScopes.get(
costPerFailure[0]): costPerFailure[1] for costPerFailure in await costFailure}
costPerFailure[0]): costPerFailure[1] for costPerFailure in costFailure}
return CalculationTimeConstrainsParametersRead(
costPerFailure=costFailurePerScope,

Loading…
Cancel
Save