chg: [Cluster] duplicates are CaSe InSenSiTiVe

pull/27/head
Christophe Vandeplas 2024-06-18 15:42:11 +02:00
parent 4a35a5a16d
commit 47ed9cb26f
No known key found for this signature in database
GPG Key ID: BDC48619FFDC5A5B
1 changed files with 2 additions and 2 deletions

View File

@ -528,7 +528,7 @@ class Cluster(Mapping): # type: ignore
self.duplicates.append((self.name, cv.value)) self.duplicates.append((self.name, cv.value))
else: else:
raise PyMISPGalaxiesError("Duplicate value ({}) in cluster: {}".format(cv.value, self.name)) raise PyMISPGalaxiesError("Duplicate value ({}) in cluster: {}".format(cv.value, self.name))
self.cluster_values[cv.value] = cv self.cluster_values[cv.value.lower()] = cv
def save(self, name: str) -> None: def save(self, name: str) -> None:
""" """
@ -562,7 +562,7 @@ class Cluster(Mapping): # type: ignore
Returns: Returns:
ClusterValue: The cluster value with the specified name. ClusterValue: The cluster value with the specified name.
""" """
return self.cluster_values[name] return self.cluster_values[name.lower()]
def __len__(self) -> int: def __len__(self) -> int:
""" """