Also accept original casing to match with ID for material profile

This fixes an issue reported by Essentium. They used capitals in their
id, so it could never match that with a material profile
This commit is contained in:
Jaime van Kessel 2022-01-17 10:53:52 +01:00
parent 348abad6eb
commit 0501b71e13

View file

@ -650,7 +650,6 @@ class XmlMaterialProfile(InstanceContainer):
machine_id_list = product_id_map.get(identifier.get("product"), [])
if not machine_id_list:
machine_id_list = self.getPossibleDefinitionIDsFromName(identifier.get("product"))
for machine_id in machine_id_list:
definitions = ContainerRegistry.getInstance().findDefinitionContainersMetadata(id = machine_id)
if not definitions:
@ -1068,6 +1067,8 @@ class XmlMaterialProfile(InstanceContainer):
id_list = {name.lower().replace(" ", ""), # simply removing all spaces
name.lower().replace(" ", "_"), # simply replacing all spaces with underscores
"_".join(merged_name_parts),
name.replace(" ", ""),
name.replace(" ", "_")
}
id_list = list(id_list)
return id_list