From ca20618a401cf278b38a388ca07af6d9bdf1e651 Mon Sep 17 00:00:00 2001 From: Niraj Adhikari Date: Fri, 29 Sep 2023 11:14:02 +0545 Subject: [PATCH] summaries api ordered by project id in descending order --- src/backend/app/projects/project_crud.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/app/projects/project_crud.py b/src/backend/app/projects/project_crud.py index 15d015ed68..0904ea9799 100644 --- a/src/backend/app/projects/project_crud.py +++ b/src/backend/app/projects/project_crud.py @@ -84,7 +84,7 @@ def get_projects( db_projects = ( db.query(db_models.DbProject) .filter(and_(*filters)) - .order_by(db_models.DbProject.id.asc()) + .order_by(db_models.DbProject.id.desc()) .offset(skip) .limit(limit) .all() @@ -93,7 +93,7 @@ def get_projects( else: db_projects = ( db.query(db_models.DbProject) - .order_by(db_models.DbProject.id.asc()) + .order_by(db_models.DbProject.id.desc()) .offset(skip) .limit(limit) .all()