mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-28 23:04:34 +08:00
Don't attempt to send the empty material
We can't send it because sending it looks up the serialised form on disk, and there is no file for this one on disk. Contributes to issue CURA-7501.
This commit is contained in:
parent
6abfa38838
commit
13d0fbdea7
@ -81,6 +81,8 @@ class SendMaterialJob(Job):
|
||||
container_registry = CuraApplication.getInstance().getContainerRegistry()
|
||||
all_materials = container_registry.findInstanceContainersMetadata(type = "material")
|
||||
all_base_files = {material["base_file"] for material in all_materials if "base_file" in material} # Filters out uniques by making it a set. Don't include files without base file (i.e. empty material).
|
||||
if "empty_material" in all_base_files:
|
||||
all_base_files.remove("empty_material") # Don't send the empty material.
|
||||
|
||||
for root_material_id in all_base_files:
|
||||
if root_material_id not in materials_to_send:
|
||||
|
Loading…
x
Reference in New Issue
Block a user