mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-17 12:25:53 +08:00
Revert "Expect to always have a build plate"
This reverts commit 0be6c9e6d37dad83b7c447bffd439a6a2b2bb1e4.
This commit is contained in:
parent
0be6c9e6d3
commit
4feb53fdf4
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user