Merge pull request #3064 from 0xhtml/fix-3063

[fix] Prevent missing setting error in ranking
This commit is contained in:
Noémi Ványi 2021-11-16 20:14:37 +01:00 committed by GitHub
commit f5b1c3fd28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -137,7 +137,7 @@ def result_score(result, language):
if hasattr(engines[result_engine], 'weight'):
weight *= float(engines[result_engine].weight)
if settings['search']['prefer_configured_language']:
if settings['search'].get('prefer_configured_language', False):
domain_parts = result['parsed_url'].netloc.split('.')
if language in domain_parts:
weight *= 1.1