mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-12 09:17:50 -06:00
Once more with feeling
Sorry, I didn't see the other review comment until after I pushed the previous commit. Contributes to issue CURA-6600.
This commit is contained in:
parent
a3e9316f48
commit
05de920c21
1 changed files with 2 additions and 2 deletions
|
@ -129,10 +129,10 @@ class SendMaterialJob(Job):
|
||||||
def _getLocalMaterials() -> Dict[str, LocalMaterial]:
|
def _getLocalMaterials() -> Dict[str, LocalMaterial]:
|
||||||
result = {} # type: Dict[str, LocalMaterial]
|
result = {} # type: Dict[str, LocalMaterial]
|
||||||
all_materials = CuraApplication.getInstance().getContainerRegistry().findInstanceContainersMetadata(type = "material")
|
all_materials = CuraApplication.getInstance().getContainerRegistry().findInstanceContainersMetadata(type = "material")
|
||||||
all_root_materials = [material for material in all_materials if material["id"] == material.get("base_file")] # Don't send materials without base_file: The empty material doesn't need to be sent.
|
all_base_files = [material for material in all_materials if material["id"] == material.get("base_file")] # Don't send materials without base_file: The empty material doesn't need to be sent.
|
||||||
|
|
||||||
# Find the latest version of all material containers in the registry.
|
# Find the latest version of all material containers in the registry.
|
||||||
for material_metadata in all_root_materials:
|
for material_metadata in all_base_files:
|
||||||
try:
|
try:
|
||||||
# material version must be an int
|
# material version must be an int
|
||||||
material_metadata["version"] = int(material_metadata["version"])
|
material_metadata["version"] = int(material_metadata["version"])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue