From be9aec624aaa9447b5a7fa5f2bc2852a4347ded7 Mon Sep 17 00:00:00 2001 From: Kostas Karmas Date: Wed, 3 Jun 2020 11:13:21 +0200 Subject: [PATCH] Use the um_cloud_cluster_id metadata when removing the cloud printer CURA-7457 --- .../src/Cloud/CloudOutputDeviceManager.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py b/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py index 2fc3171c04..7ee8322ba1 100644 --- a/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py +++ b/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py @@ -300,6 +300,6 @@ class CloudOutputDeviceManager: :return: None """ if isinstance(container, GlobalStack): - printer_clusters_map = {cluster.name: cluster_id for cluster_id, cluster in self._remote_clusters.items()} - if container.name in printer_clusters_map: - del self._remote_clusters[printer_clusters_map[container.name]] + container_cluster_id = container.getMetaDataEntry(self.META_CLUSTER_ID, None) + if container_cluster_id in self._remote_clusters.keys(): + del self._remote_clusters[container_cluster_id]