mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-13 10:07:15 +01:00
Enhancement: support retain barcode split pages (#7912)
This commit is contained in:
parent
cb617531bc
commit
9b84dc06b6
4 changed files with 52 additions and 1 deletions
|
|
@ -387,7 +387,12 @@ class BarcodePlugin(ConsumeTaskPlugin):
|
|||
"""
|
||||
# filter all barcodes for the separator string
|
||||
# get the page numbers of the separating barcodes
|
||||
separator_pages = {bc.page: False for bc in self.barcodes if bc.is_separator}
|
||||
retain = settings.CONSUMER_BARCODE_RETAIN_SPLIT_PAGES
|
||||
separator_pages = {
|
||||
bc.page: retain
|
||||
for bc in self.barcodes
|
||||
if bc.is_separator and (not retain or (retain and bc.page > 0))
|
||||
} # as below, dont include the first page if retain is enabled
|
||||
if not settings.CONSUMER_ENABLE_ASN_BARCODE:
|
||||
return separator_pages
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue