From dcfab2f923f4617717de82a37daff6c6002e60fe Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 22 Jan 2018 15:47:37 +0100 Subject: [PATCH] Failed state in printjobs is now handled correctly --- plugins/UM3NetworkPrinting/ClusterUM3OutputDevice.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/UM3NetworkPrinting/ClusterUM3OutputDevice.py b/plugins/UM3NetworkPrinting/ClusterUM3OutputDevice.py index b5cbc33d51..8f9a4d1d8f 100644 --- a/plugins/UM3NetworkPrinting/ClusterUM3OutputDevice.py +++ b/plugins/UM3NetworkPrinting/ClusterUM3OutputDevice.py @@ -287,7 +287,11 @@ class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice): self._updatePrintJob(print_job, print_job_data) if print_job.state != "queued": # Print job should be assigned to a printer. - printer = self._getPrinterByKey(print_job_data["printer_uuid"]) + if print_job.state == "failed": + # Print job was failed, so don't attach it to a printer. + printer = None + else: + printer = self._getPrinterByKey(print_job_data["printer_uuid"]) else: # The job can "reserve" a printer if some changes are required. printer = self._getPrinterByKey(print_job_data["assigned_to"])