From 56bf0f048733b4f190bd3f682ac149d6c60dc5e2 Mon Sep 17 00:00:00 2001 From: Oliver Date: Wed, 10 Nov 2021 09:03:15 +1100 Subject: [PATCH] Fix for printing multiple reports at once (bug introduced in 79434bb) --- InvenTree/report/api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/InvenTree/report/api.py b/InvenTree/report/api.py index 36a99079ad..af88f4799f 100644 --- a/InvenTree/report/api.py +++ b/InvenTree/report/api.py @@ -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()