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 resetting modified_attributes #449

Merged
merged 1 commit into from
Feb 5, 2024

Conversation

sni
Copy link
Contributor

@sni sni commented Feb 2, 2024

resetting modified_attributes to zero had no effect. The reason was a wrong assumption when reading the retention file. The retained value was restored even if the correspondig modified_attributes was not set (anymore).

Now we have the following attribute changes (assuming retention is enabled):

  • attribute was changed via gui -> retained on next reload
  • attribute was changed via gui but config value changed afterwards -> use the configured value instead of the retained one
  • config value changed and attribute has not been changed via gui -> use the configured value

resetting modified_attributes to zero had no effect. The reason was a wrong
assumption when reading the retention file. The retained value was restored
even if the correspondig modified_attributes was not set (anymore).

Now we have the following attribute changes (assuming retention is enabled):

- attribute was changed via gui -> retained on next reload
- attribute was changed via gui but config value changed afterwards -> use the configured value instead of the retained one
- config value changed and attribute has not been changed via gui -> use the configured value

Signed-off-by: Sven Nierlein <[email protected]>
Copy link
Member

@nook24 nook24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🦄

@sni sni merged commit 47b5617 into naemon:master Feb 5, 2024
26 checks passed
@sni sni deleted the fix_resetting_modified_attributes branch February 9, 2024 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants