Browse Source

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
Jaime van Kessel 3 years ago
parent
commit
0501b71e13
1 changed files with 2 additions and 1 deletions
  1. 2 1
      plugins/XmlMaterialProfile/XmlMaterialProfile.py

+ 2 - 1
plugins/XmlMaterialProfile/XmlMaterialProfile.py

@@ -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