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

Commit 5a7f85ec authored by Thomas Pointhuber's avatar Thomas Pointhuber
Browse files

[fix] #121, HTTP 500 Error if res["content"] == None

parent 58cc0335
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -131,7 +131,7 @@ def score_results(results):
        weight = 1.0

        # strip multiple spaces and cariage returns from content
        if 'content' in res:
        if res.get('content'):
            res['content'] = re.sub(' +', ' ',
                                    res['content'].strip().replace('\n', ''))