From 8d39c24b23fe56b7655b3bd7b3a8ac61cd2b9df9 Mon Sep 17 00:00:00 2001 From: Richard Date: Wed, 28 Jun 2023 09:21:34 +0200 Subject: [PATCH] Order sidejobs desc --- src/api/crud.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/api/crud.py b/src/api/crud.py index 6aa70280..f926b776 100644 --- a/src/api/crud.py +++ b/src/api/crud.py @@ -124,6 +124,7 @@ def get_sidejobs_by_politician_id(db: Session, id: int, version: str = "v2"): == models.SidejobHasMandate.candidacy_mandate_id ) .filter(models.SidejobHasMandate.sidejob_id == models.Sidejob.id) + .order_by(models.Sidejob.id.desc()) .all() )