diff --git a/src/py/mat3ra/made/tools/build/defect/builders.py b/src/py/mat3ra/made/tools/build/defect/builders.py index ad04182e..d430724c 100644 --- a/src/py/mat3ra/made/tools/build/defect/builders.py +++ b/src/py/mat3ra/made/tools/build/defect/builders.py @@ -149,12 +149,12 @@ def create_material_with_additional_layers_int(self, material: Material, added_t new_material = material.clone() termination = Termination.from_string(new_material.metadata.get("build").get("termination")) - build_config = new_material.metadata.get("build").get("configuration").copy() + build_config = new_material.metadata.get("build").get("configuration") if build_config["type"] != "SlabConfiguration": raise ValueError("Material is not a slab.") build_config.pop("type") - build_config["thickness"] += added_thickness + build_config["thickness"] = build_config["thickness"] + added_thickness new_slab_config = SlabConfiguration(**build_config) material_with_additional_layers = create_slab(new_slab_config, termination)