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

Implement has_changed flag in bones and Skeletons #1123

Open
sveneberth opened this issue Mar 26, 2024 · 2 comments
Open

Implement has_changed flag in bones and Skeletons #1123

sveneberth opened this issue Mar 26, 2024 · 2 comments
Labels
feature New feature or request Priority: Medium This issue may be useful, and needs some attention.

Comments

@sveneberth
Copy link
Member

After I assign a different value to bone, this boolean flag should be True, otherwise it should stay False. This should help to find out whether a skeleton should be saved or whether it has not been changed.

But they should be real changes.

If the skeletons value is already ["foo", "bar"] (multiple StringBone), and I call setBoneValue(["foo", "bar"]), that should not be a change.
Likewise, in a multilang bone with {"de": "foo", "en": "bar"} and the languages de, fr, en, setBoneValue({"de": "foo", "en": "bar", "nl": "baz"}) should not lead to any change, as nl is new but not relevant for this bone.

@sveneberth sveneberth added feature New feature or request Priority: Medium This issue may be useful, and needs some attention. labels Mar 26, 2024
@phorward
Copy link
Member

Skeleton.toDB() builds a change_list, see https://github.com/viur-framework/viur-core/blob/main/src/viur/core/skeleton.py#L987. Maybe this goes into the direction of what you need.

@phorward
Copy link
Member

Refers to #630 as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request Priority: Medium This issue may be useful, and needs some attention.
Projects
None yet
Development

No branches or pull requests

2 participants