Merge pull request #2277 from SchrodingersGat/multi-report-fix

Fix for printing multiple reports at once
This commit is contained in:
Oliver 2021-11-10 09:26:55 +11:00 committed by GitHub
commit ab32ab0b3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -257,7 +257,6 @@ class ReportPrintMixin:
pages = []
try:
pdf = outputs[0].get_document().copy(pages).write_pdf()
if len(outputs) > 1:
# If more than one output is generated, merge them into a single file
@ -265,6 +264,8 @@ class ReportPrintMixin:
doc = output.get_document()
for page in doc.pages:
pages.append(page)
pdf = outputs[0].get_document().copy(pages).write_pdf()
else:
pdf = outputs[0].get_document().write_pdf()