From 08394c99d32d13ad70fb5b19eba26b8e83aff04e Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 6 Feb 2018 14:27:54 +0100 Subject: [PATCH] PossibleDefinitionIds from name only returns distinct names It would sometimes return 3x the same id. --- plugins/XmlMaterialProfile/XmlMaterialProfile.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/XmlMaterialProfile/XmlMaterialProfile.py b/plugins/XmlMaterialProfile/XmlMaterialProfile.py index 39cbe5669c..f5e9a2c2b1 100644 --- a/plugins/XmlMaterialProfile/XmlMaterialProfile.py +++ b/plugins/XmlMaterialProfile/XmlMaterialProfile.py @@ -916,11 +916,11 @@ class XmlMaterialProfile(InstanceContainer): else: merged_name_parts.append(part) - id_list = [name.lower().replace(" ", ""), # simply removing all spaces + id_list = {name.lower().replace(" ", ""), # simply removing all spaces name.lower().replace(" ", "_"), # simply replacing all spaces with underscores "_".join(merged_name_parts), - ] - + } + id_list = list(id_list) return id_list ## Gets a mapping from product names in the XML files to their definition