From d6c25067e3a6d1dba88940d760aa94100c95afb6 Mon Sep 17 00:00:00 2001 From: Nathan Tien You <nathan.tien-you@univ-grenoble-alpes.fr> Date: Tue, 4 Feb 2025 15:45:34 +0000 Subject: [PATCH 1/2] fix: duplicate cols in /journals view --- src/gdml/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gdml/views.py b/src/gdml/views.py index 31ab563..3e062e2 100755 --- a/src/gdml/views.py +++ b/src/gdml/views.py @@ -209,7 +209,6 @@ class GDMLJournalsView(TemplateView): content__article=None, ) .filter(coltype=self.document_type, parent=None) - .annotate(source_domain=F("periods__source__domain")) .order_by("title_tex") ) @@ -220,6 +219,8 @@ class GDMLJournalsView(TemplateView): # Remove `.all()` here to cache the query set results collections = self.qs.all() + for c in collections: + pass letters = [] # IDEA : room for more optimization here: # Iterate only once on collections and store first letter somewhere. -- GitLab From 175e6bba4febf738b136421927c2eb2c48e03517 Mon Sep 17 00:00:00 2001 From: Nathan Tien You <nathan.tien-you@univ-grenoble-alpes.fr> Date: Tue, 4 Feb 2025 15:46:09 +0000 Subject: [PATCH 2/2] chore : remove comment --- src/gdml/views.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/gdml/views.py b/src/gdml/views.py index 3e062e2..6c600ef 100755 --- a/src/gdml/views.py +++ b/src/gdml/views.py @@ -219,8 +219,6 @@ class GDMLJournalsView(TemplateView): # Remove `.all()` here to cache the query set results collections = self.qs.all() - for c in collections: - pass letters = [] # IDEA : room for more optimization here: # Iterate only once on collections and store first letter somewhere. -- GitLab