Skip to content

fix: BaseBone._get_distinct_hash#1662

Merged
phorward merged 1 commit intoviur-framework:mainfrom
phorward:fix-Bone._get_destinct_hash
Apr 10, 2026
Merged

fix: BaseBone._get_distinct_hash#1662
phorward merged 1 commit intoviur-framework:mainfrom
phorward:fix-Bone._get_destinct_hash

Conversation

@phorward
Copy link
Copy Markdown
Member

@phorward phorward commented Apr 9, 2026

The feature introduced by #1228 didn't work under all circumstances. This version should be much more robust. It changes signatures, but it won't be a problem due current lack of feature use.

In this case, a RecordBone containing a RelationalBone failed with

File ".venv/lib/python3.13/site-packages/viur/core/bones/relational.py", line 483, in _get_single_destinct_hash
    parts = [value["dest"]["key"]]
             ~~~~~^^^^^^^^
TypeError: string indices must be integers, not 'str'

The feature introduced by viur-framework#1228 didn't work under all circumstances.
This version should be much more robust. It changes signatures, but it won't be a problem due current lack of feature use.

In this case, a RecordBone containing a RelationalBone failed with
```
File ".venv/lib/python3.13/site-packages/viur/core/bones/relational.py", line 483, in _get_single_destinct_hash
    parts = [value["dest"]["key"]]
             ~~~~~^^^^^^^^
TypeError: string indices must be integers, not 'str'
```
@phorward phorward added this to the ViUR-core v3.8 milestone Apr 9, 2026
@phorward phorward self-assigned this Apr 9, 2026
@phorward phorward added the bug(fix) Something isn't working or address a specific issue or vulnerability label Apr 9, 2026
@phorward phorward added the Priority: Medium This issue may be useful, and needs some attention. label Apr 9, 2026
@phorward phorward merged commit 1511fc3 into viur-framework:main Apr 10, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug(fix) Something isn't working or address a specific issue or vulnerability Priority: Medium This issue may be useful, and needs some attention.

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants