|
|
|
|
@ -508,7 +508,7 @@ async def get_simulation_with_plot_result(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async def get_calc_result_by(
|
|
|
|
|
*, db_session: DbSession, simulation_id: UUID, aeros_node_id: Optional[UUID] = None
|
|
|
|
|
*, db_session: DbSession, simulation_id: UUID, node_name: Optional[str] = None
|
|
|
|
|
):
|
|
|
|
|
"""Get a simulation node by column."""
|
|
|
|
|
# Build WHERE conditions from kwargs
|
|
|
|
|
@ -516,8 +516,8 @@ async def get_calc_result_by(
|
|
|
|
|
AerosSimulationCalcResult.aeros_simulation_id == simulation_id
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
if aeros_node_id:
|
|
|
|
|
query = query.where(AerosSimulationCalcResult.aeros_node_id == aeros_node_id)
|
|
|
|
|
if node_name:
|
|
|
|
|
query = query.join(AerosSimulationCalcResult.aeros_node).filter(AerosNode.node_name == node_name)
|
|
|
|
|
|
|
|
|
|
result = await db_session.execute(query)
|
|
|
|
|
return result.scalar()
|
|
|
|
|
|