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

Commit 58d51e08 authored by Alexandre Flament's avatar Alexandre Flament
Browse files

[fix] wikipedia: minor fix: return no result instead of crash in some very few cases.

In few cases, the JSON results doesn't contains the key 'type'.
parent cdceec1c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ def response(resp):
    api_result = loads(resp.text)

    # skip disambiguation pages
    if api_result['type'] != 'standard':
    if api_result.get('type') != 'standard':
        return []

    title = api_result['title']