From b6b7368ca9b1b111069c7fc7ae4986cd571a3585 Mon Sep 17 00:00:00 2001 From: Arnaud-D <35631001+Arnaud-D@users.noreply.github.com> Date: Sun, 8 Oct 2023 21:56:59 +0200 Subject: [PATCH] =?UTF-8?q?Change=20le=20tri=20par=20d=C3=A9faut=20sur=20l?= =?UTF-8?q?es=20listes=20de=20publications=20par=20auteur?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zds/tutorialv2/urls/urls_opinions.py | 2 +- zds/tutorialv2/views/lists.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/zds/tutorialv2/urls/urls_opinions.py b/zds/tutorialv2/urls/urls_opinions.py index 445c618999..ff1ac65929 100644 --- a/zds/tutorialv2/urls/urls_opinions.py +++ b/zds/tutorialv2/urls/urls_opinions.py @@ -21,7 +21,7 @@ path("", ListOpinions.as_view(), name="list"), path( "voir//", - ContentOfAuthor.as_view(type="OPINION", context_object_name="opinions", sort="creation"), + ContentOfAuthor.as_view(type="OPINION", context_object_name="opinions"), name="find-opinion", ), ] diff --git a/zds/tutorialv2/views/lists.py b/zds/tutorialv2/views/lists.py index 4cd5f6da6c..2966683023 100644 --- a/zds/tutorialv2/views/lists.py +++ b/zds/tutorialv2/views/lists.py @@ -395,7 +395,7 @@ def get_queryset(self): if "sort" in self.request.GET and self.request.GET["sort"].lower() in self.sorts: self.sort = self.request.GET["sort"] elif not self.sort: - self.sort = "abc" + self.sort = "modification" queryset = self.sorts[self.sort.lower()][0](queryset) return queryset