Parsing: Add the 'content' attribute
Add the 'content' attribute to documents to allow access to a document's parsed content for indexing and other purposes. Fixes the document parsing indexing failing test. Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
@@ -14,6 +14,11 @@ def get_document_content(document):
|
||||
try:
|
||||
page_content = page.content.content
|
||||
except DocumentPageContent.DoesNotExist:
|
||||
pass
|
||||
yield ''
|
||||
else:
|
||||
yield conditional_escape(force_text(page_content))
|
||||
|
||||
|
||||
@property
|
||||
def document_property_content(self):
|
||||
return ' '.join(get_document_content(self))
|
||||
|
||||
Reference in New Issue
Block a user