mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 01:15:51 +08:00
Check if printerConfiguration is actually set before trying to access it
This commit is contained in:
parent
e02f0f1480
commit
ab3f627177
@ -80,6 +80,11 @@ class ClusterPrinterStatus(BaseModel):
|
|||||||
model.updateBuildplate(self.build_plate.type if self.build_plate else "glass")
|
model.updateBuildplate(self.build_plate.type if self.build_plate else "glass")
|
||||||
model.setCameraUrl(QUrl("http://{}:8080/?action=stream".format(self.ip_address)))
|
model.setCameraUrl(QUrl("http://{}:8080/?action=stream".format(self.ip_address)))
|
||||||
|
|
||||||
|
if not model.printerConfiguration:
|
||||||
|
# Prevent accessing printer configuration when not available.
|
||||||
|
# This sometimes happens when a printer was just added to a group and Cura is connected to that group.
|
||||||
|
return
|
||||||
|
|
||||||
# Set the possible configurations based on whether a Material Station is present or not.
|
# Set the possible configurations based on whether a Material Station is present or not.
|
||||||
if self.material_station and self.material_station.material_slots:
|
if self.material_station and self.material_station.material_slots:
|
||||||
self._updateAvailableConfigurations(model)
|
self._updateAvailableConfigurations(model)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user