Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix
Browse files Browse the repository at this point in the history
sveneberth committed Jan 23, 2025
1 parent e255949 commit 96bb74d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/viur/core/bones/string.py
Original file line number Diff line number Diff line change
@@ -351,10 +351,12 @@ def getUniquePropertyIndexValues(self, skel: "SkeletonInstance", name: str) -> l
# Not yet implemented as it's unclear if we should keep each language distinct or not
raise NotImplementedError()

if not self.caseSensitive and (val := skel[name]) is not None:
if not self.caseSensitive and (value := skel[name]) is not None:
if self.multiple:
val = [v.lower() for v in val]
return self._hashValueForUniquePropertyIndex(val.lower())
value = [v.lower() for v in value]
else:
value = value.lower()
return self._hashValueForUniquePropertyIndex(value)

return super().getUniquePropertyIndexValues(skel, name)

0 comments on commit 96bb74d

Please sign in to comment.