From 22fbef26a39a5a3f3ac0db358de2c2e3c827e1aa Mon Sep 17 00:00:00 2001 From: Cizz22 Date: Thu, 9 Oct 2025 17:20:16 +0700 Subject: [PATCH] fix --- src/aeros_simulation/service.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/aeros_simulation/service.py b/src/aeros_simulation/service.py index 2bcba8d..c0f666e 100644 --- a/src/aeros_simulation/service.py +++ b/src/aeros_simulation/service.py @@ -38,9 +38,9 @@ active_simulations = {} # Get Data Service async def get_all(common: CommonParameters, status): - query = select(AerosSimulation) + query = select(AerosSimulation).order_by(desc(AerosSimulation.created_at)) if status: - query = query.where(AerosSimulation.status == "completed").order_by(desc(AerosSimulation.created_at)) + query = query.where(AerosSimulation.status == "completed") results = await search_filter_sort_paginate(model=query, **common)