mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-09 08:15:27 +01:00
only show score when sorting by score
This commit is contained in:
parent
0d5fd229bf
commit
f3703fc6e3
2 changed files with 8 additions and 6 deletions
|
|
@ -246,11 +246,13 @@ class DelayedQuery:
|
|||
sortedby is None):
|
||||
self.first_score = page.results[0].score
|
||||
|
||||
if self.first_score:
|
||||
page.results.top_n = list(map(
|
||||
lambda hit: (hit[0] / self.first_score, hit[1]),
|
||||
page.results.top_n
|
||||
))
|
||||
page.results.top_n = list(map(
|
||||
lambda hit: (
|
||||
(hit[0] / self.first_score) if self.first_score else None,
|
||||
hit[1]
|
||||
),
|
||||
page.results.top_n
|
||||
))
|
||||
|
||||
self.saved_results[item.start] = page
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue