From d348e6314aef4869755bad3fd6b1fbbed46afd29 Mon Sep 17 00:00:00 2001 From: thomas girod Date: Thu, 25 Jul 2024 17:28:10 +0200 Subject: [PATCH] fix the pictures order (not just the album) --- core/views/user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/views/user.py b/core/views/user.py index 821c62d0..bd65ca8a 100644 --- a/core/views/user.py +++ b/core/views/user.py @@ -314,7 +314,7 @@ class UserPicturesView(UserTabsMixin, CanViewMixin, DetailView): kwargs = super().get_context_data(**kwargs) kwargs["pictures"] = list( Picture.objects.filter(people__user_id=self.object.id) - .order_by("-parent__date", "id") + .order_by("-parent__date", "-date") .annotate(album=F("parent__name")) ) return kwargs