Failed state in printjobs is now handled correctly

This commit is contained in:
Jaime van Kessel 2018-01-22 15:47:37 +01:00
parent 172b4e57a4
commit dcfab2f923

View file

@ -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"])