mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-09 07:56:22 -06:00
Check if printerConfiguration is actually set before trying to access it
This commit is contained in:
parent
e02f0f1480
commit
ab3f627177
1 changed files with 5 additions and 0 deletions
|
@ -80,6 +80,11 @@ class ClusterPrinterStatus(BaseModel):
|
|||
model.updateBuildplate(self.build_plate.type if self.build_plate else "glass")
|
||||
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.
|
||||
if self.material_station and self.material_station.material_slots:
|
||||
self._updateAvailableConfigurations(model)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue