|
|
|
@ -46,7 +46,7 @@ async def get_simulation_by_id(
|
|
|
|
if simulation_id:
|
|
|
|
if simulation_id:
|
|
|
|
query = query.where(AerosSimulation.id == simulation_id)
|
|
|
|
query = query.where(AerosSimulation.id == simulation_id)
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
query = query.order_by(AerosSimulation.created_at.desc()).limit(1)
|
|
|
|
query = query.order_by(AerosSimulation.completed_at.desc()).limit(1)
|
|
|
|
|
|
|
|
|
|
|
|
results = await db_session.execute(query)
|
|
|
|
results = await db_session.execute(query)
|
|
|
|
return results.scalar()
|
|
|
|
return results.scalar()
|
|
|
|
|