An open source, non-profit web search engine
Add a comment explaining what we're doing
Daoud Clarke4ba25a77b433
diff --git a/mwmbl/tinysearchengine/indexer.py b/mwmbl/tinysearchengine/indexer.pyindex 506b9b9..121b353 100644--- a/mwmbl/tinysearchengine/indexer.py+++ b/mwmbl/tinysearchengine/indexer.py@@ -52,6 +52,8 @@ class Document:state: Optional[int] = Nonedef __init__(self, title, url, extract, score, term=None, state=None):+ # Sometimes the title or extract may be None, probably because of user generated content+ # It's not allowed to be None though, or things will breakself.title = title if title is not None else ''self.url = urlself.extract = extract if extract is not None else ''