fix the pictures order (not just the album)

This commit is contained in:
thomas girod 2024-07-25 17:28:10 +02:00 committed by Bartuccio Antoine
parent b3fa6f352b
commit d348e6314a

View File

@ -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