Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: a not caseSensitive bone should lock the lower value #1378

Merged
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/viur/core/bones/string.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,9 @@ 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:
return self._hashValueForUniquePropertyIndex(val.lower())

return super().getUniquePropertyIndexValues(skel, name)

def refresh(self, skel: "SkeletonInstance", bone_name: str) -> None:
Expand Down
Loading