Description of problem: See title Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. Go to power config page of system form. Change nothing 2. Click on 'Save Power Changes' 3. Actual results: 'Updated Power' appears as a flash message Three new entries are added, one for each of: * reprovision_distro_tree * release_action * power_type The above will repeat on successive clicks of 'Save Power Changes'. Expected results: No flash message, no addition to the system activity logs. Additional info:
There are a couple of issues here. The issue with the power type is simple, it's comparing a string and an int on the controller code. The reprovision distro and release action are not even checked as to whether or not there has been a change. Even once the code is changed so that they are checked, we should probably be supplying a default (if there is one available in the case of the distro) so we don't get the 'None -> 'PowerOff' etc.
This is fixed by the patch for bug 1070036: http://gerrit.beaker-project.org/2865
This was merged to develop as part of the new-system-page branch.
(In reply to xuezhi ma from comment #6) > Whether we not format the '' before compare it with system.power.power_user? > if 'power_user' in data and data['power_user'] != system.power.power_user: Right, we are treating None (NULL) distinct from '' (empty string), and so we are logging it as a change even if you just save the form leaving the fields empty. http://gerrit.beaker-project.org/3349
Beaker 19.0 has been released.