From 0d5fd229bf61df17dea1ec65ca63e93d042d2825 Mon Sep 17 00:00:00 2001 From: jonaswinkler <17569239+jonaswinkler@users.noreply.github.com> Date: Sat, 15 May 2021 17:11:26 +0200 Subject: [PATCH] disable reverse sorting by score --- src/documents/index.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/documents/index.py b/src/documents/index.py index 90f896199..ce64c4b2f 100644 --- a/src/documents/index.py +++ b/src/documents/index.py @@ -184,7 +184,7 @@ class DelayedQuery: return None def _get_query_sortedby(self): - if not 'ordering' in self.query_params: + if 'ordering' not in self.query_params: return None, False field: str = self.query_params['ordering'] @@ -196,8 +196,7 @@ class DelayedQuery: "title": "title", "correspondent__name": "correspondent", "document_type__name": "type", - "archive_serial_number": "asn", - "score": None, + "archive_serial_number": "asn" } if field.startswith('-'):