Don't send reason field in PrintCancelled event payload

This commit is contained in:
Gina Häußge committed 2019-01-16 18:47:40 +01:00
1 parent b7f17531d2
commit 6b9c9f47da
1 file changed
+2 -1
+2 -1
View File
@@ -1205,7 +1205,6 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback):
action_user=user)
if payload:
payload["time"] = self._comm.getPrintTime()
payload["reason"] = "cancelled"
eventManager().fire(Events.PRINT_CANCELLED, payload)
self._logger_job.info("Print job cancelled - origin: {}, path: {}, owner: {}, user: {}".format(payload.get("origin"),
@@ -1219,6 +1218,8 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback):
part_of_job=True,
must_be_set=False)
payload["reason"] = "cancelled"
def finalize():
self._fileManager.log_print(payload["origin"],
payload["path"],