Fixes the interaction when both splitting and ASN are enabled (#5779)

This commit is contained in:
Trenton H
2024-02-15 09:33:26 -08:00
committed by GitHub
parent f6ddcfa839
commit 8d664fad56
2 changed files with 8 additions and 6 deletions

View File

@@ -100,11 +100,9 @@ class BarcodePlugin(ConsumeTaskPlugin):
logger.info(f"Found tags in barcode: {tags}")
# Lastly attempt to split documents
if settings.CONSUMER_ENABLE_BARCODES:
separator_pages = self.get_separation_pages()
if not separator_pages:
return "No pages to split on!"
if settings.CONSUMER_ENABLE_BARCODES and (
separator_pages := self.get_separation_pages()
):
# We have pages to split against