Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit f5b1c3fd authored by Noémi Ványi's avatar Noémi Ványi Committed by GitHub
Browse files

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

[fix] Prevent missing setting error in ranking
parents db2e8fd8 ebbb9f60
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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