Project

General

Profile

Actions

Bug #36701

open

Settings set to its default value may return old value

Added by Bernhard Suttner 9 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

Scenario:
- Setting S has default value D
- With GUI or hammer, S is set to value V
- Afterwards, S is set back to D

If you then run something like this to grab the settings:
while true; do date; hammer settings list | egrep 'ignore_|expire_soon_days|puppet_out_of_sync_disabled|login_text'; done

it will return the value V from time to time instead of the value D (which was the last value set to to S)

This happend with integer and default values.

I only found one workaround to remove 'before_save :clear_value_when_default' - then the default value is set to the settings table even if its the default value and everyting works as expected.

No data to display

Actions

Also available in: Atom PDF