From 4feb53fdf485b7932e9749297dbf6c866d196c63 Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Fri, 15 Feb 2019 10:12:19 +0100 Subject: [PATCH] Revert "Expect to always have a build plate" This reverts commit 0be6c9e6d37dad83b7c447bffd439a6a2b2bb1e4. --- .../src/Cloud/Models/CloudClusterPrinterStatus.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/plugins/UM3NetworkPrinting/src/Cloud/Models/CloudClusterPrinterStatus.py b/plugins/UM3NetworkPrinting/src/Cloud/Models/CloudClusterPrinterStatus.py index 78bf0013f1..96310b8229 100644 --- a/plugins/UM3NetworkPrinting/src/Cloud/Models/CloudClusterPrinterStatus.py +++ b/plugins/UM3NetworkPrinting/src/Cloud/Models/CloudClusterPrinterStatus.py @@ -48,7 +48,7 @@ class CloudClusterPrinterStatus(BaseCloudModel): self.maintenance_required = maintenance_required self.firmware_update_status = firmware_update_status self.latest_available_firmware = latest_available_firmware - self.build_plate = self.parseModel(CloudClusterBuildPlate, build_plate) + self.build_plate = self.parseModel(CloudClusterBuildPlate, build_plate) if build_plate else None super().__init__(**kwargs) ## Creates a new output model. @@ -65,7 +65,13 @@ class CloudClusterPrinterStatus(BaseCloudModel): model.updateName(self.friendly_name) model.updateType(self.machine_variant) model.updateState(self.status if self.enabled else "disabled") - model.updateBuildplate(self.build_plate.type) + + # Make sure to set the build plate even though we don't use it. Since it's optional, use + # glass as a default + if self.build_plate: + model.updateBuildplate(self.build_plate.type) + else: + model.updateBuildplate("glass") for configuration, extruder_output, extruder_config in \ zip(self.configuration, model.extruders, model.printerConfiguration.extruderConfigurations):