From 5d294a7ff50f88485ad6f51f106a1f79c4ccfc7f Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Fri, 15 Feb 2019 10:04:39 +0100 Subject: [PATCH] Handle self.build_plate = None Contributes to CL-1250 --- .../src/Cloud/Models/CloudClusterPrinterStatus.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/UM3NetworkPrinting/src/Cloud/Models/CloudClusterPrinterStatus.py b/plugins/UM3NetworkPrinting/src/Cloud/Models/CloudClusterPrinterStatus.py index 80c5fc72fc..96310b8229 100644 --- a/plugins/UM3NetworkPrinting/src/Cloud/Models/CloudClusterPrinterStatus.py +++ b/plugins/UM3NetworkPrinting/src/Cloud/Models/CloudClusterPrinterStatus.py @@ -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):