From 4459b6f1897c72fa7a70396a25452cf189c09a48 Mon Sep 17 00:00:00 2001 From: Harris Tzovanakis Date: Wed, 13 Dec 2023 09:43:16 +0100 Subject: [PATCH] search: fix default ordering --- scoap3/articles/api/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scoap3/articles/api/views.py b/scoap3/articles/api/views.py index 8364d8231..f8b0c2be0 100644 --- a/scoap3/articles/api/views.py +++ b/scoap3/articles/api/views.py @@ -96,6 +96,8 @@ class ArticleDocumentView(BaseDocumentViewSet): search_fields = ("title", "id", "authors.first_name", "authors.last_name") + ordering = ["-updated_at"] + filter_fields = { "publication_year": { "field": "publication_date",