Fix syncing empty material with cloud

For some reason the cloud gives a 0000 guid when the material is empty.
This commit is contained in:
Jaime van Kessel 2020-06-18 11:03:40 +02:00
parent 7d75060342
commit 930d92869a
No known key found for this signature in database
GPG key ID: 3710727397403C91

View file

@ -1377,8 +1377,8 @@ class MachineManager(QObject):
for extruder_configuration in configuration.extruderConfigurations:
# We support "" or None, since the cloud uses None instead of empty strings
extruder_has_hotend = extruder_configuration.hotendID and extruder_configuration.hotendID != ""
extruder_has_material = extruder_configuration.material.guid and extruder_configuration.material.guid != ""
extruder_has_hotend = extruder_configuration.hotendID not in ["", None]
extruder_has_material = extruder_configuration.material.guid not in [None, "", "00000000-0000-0000-0000-000000000000"]
# If the machine doesn't have a hotend or material, disable this extruder
if not extruder_has_hotend or not extruder_has_material: