Bug #35894
closedForeman.settings.load_values is not able to pick settings which transitioned from a non-default to default value
Description
When a setting is set back to its default value, the value persisted in DB is `nil` to denominate that the default value should be used. However, the setting registry only looks at settings with non-nil values so it never picks up the nondefault->default transition.
Steps to reproduce:
1) Run rails console
2) Pick a $setting without custom value
3) Read a value of $setting with Setting[$setting]
4) In another process, change the value of $setting to a non-default one
5) Reload the settings with Foreman.settings.load_values
6) Repeat 3, notice the value is what was set in 4
6) In another process, change the value of $setting to the default one
7) Repeat 5
8) Repeat 3
Actual results:
The value in 8 is the same as in 6
Expected results:
The value in 8 is the same as in 3
Updated by The Foreman Bot almost 2 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/9570 added
Updated by Adam Ruzicka almost 2 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset foreman|acafe1aae2eef439a73334635046dfb79be55894.
Updated by Ewoud Kohl van Wijngaarden almost 2 years ago
- Triaged changed from No to Yes