OCR, Parsing: Revert iterator stop
Revert how the OCR and document parsing generators end their iteration. Originally they issue an empty return, then a blank yield was added. This commit reverts the blank yield and restores the original 'return' behavior. Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
@@ -14,7 +14,7 @@ def get_document_content(document):
|
||||
try:
|
||||
page_content = page.content.content
|
||||
except DocumentPageContent.DoesNotExist:
|
||||
yield ''
|
||||
return
|
||||
else:
|
||||
yield conditional_escape(force_text(page_content))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user