From 761bf3b8fab02b8884d1780b211abfd92b8ced53 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Fri, 19 Aug 2022 14:44:19 +0200 Subject: [PATCH] Fix creating abstract machines on account sync Cura-9277 Co-authored-by: joeydelarago --- cura/Settings/AbstractMachine.py | 4 ++-- .../UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cura/Settings/AbstractMachine.py b/cura/Settings/AbstractMachine.py index 0dd4dfb1c0..837cfad4bd 100644 --- a/cura/Settings/AbstractMachine.py +++ b/cura/Settings/AbstractMachine.py @@ -6,8 +6,8 @@ from cura.Settings.GlobalStack import GlobalStack class AbstractMachine(GlobalStack): """ Behaves as a type of machine, represents multiple machines of the same type """ - def __init__(self): - super(self) + def __init__(self, container_id: str): + super().__init__(container_id) self.setMetaDataEntry("type", "abstract_machine") def getMachinesOfType(self) -> List[GlobalStack]: diff --git a/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py b/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py index f5ede7c0d1..a73d08d8fa 100644 --- a/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py +++ b/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py @@ -405,7 +405,7 @@ class CloudOutputDeviceManager: self._setOutputDeviceMetadata(device, new_machine) - CuraStackBuilder.createAbstractMachine(new_machine) + CuraStackBuilder.createAbstractMachine(device.name, device.printerType) if activate: CuraApplication.getInstance().getMachineManager().setActiveMachine(new_machine.getId())