mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 21:36:03 +08:00
Fix KeyError color_code in BaseMaterialsModel
This commit is contained in:
parent
3e3f1cb03d
commit
40c4e9c5df
@ -124,7 +124,7 @@ class BaseMaterialsModel(ListModel):
|
|||||||
"description": metadata["description"],
|
"description": metadata["description"],
|
||||||
"material": metadata["material"],
|
"material": metadata["material"],
|
||||||
"color_name": metadata["color_name"],
|
"color_name": metadata["color_name"],
|
||||||
"color_code": metadata["color_code"],
|
"color_code": metadata.get("color_code", ""),
|
||||||
"density": metadata.get("properties", {}).get("density", ""),
|
"density": metadata.get("properties", {}).get("density", ""),
|
||||||
"diameter": metadata.get("properties", {}).get("diameter", ""),
|
"diameter": metadata.get("properties", {}).get("diameter", ""),
|
||||||
"approximate_diameter": metadata["approximate_diameter"],
|
"approximate_diameter": metadata["approximate_diameter"],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user