Description of problem:
Sometimes I hit 'BAD REQUEST: System access policy not specified' when saving the power settings on the system page.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. click 'Add' button to create a new system on the systems page
2. fill in the essentials first
3. fill in the power settings
4. click on the "Access Policy" Tab
5. click on the "Power Settings" back to the power setting form
6. update the power settings and save the form
Can't save the form with the error "BAD REQUEST: System access policy not specified"
The form should be saved successfully.
Okay, got it...
The steps to reproduce are actually shorter:
1. Add a new system, fill out arch and lab controller on Essential tab
2. Go to power settings tab and fill in some settings, click Save Changes
<-- this step works, but the server response has "id": null which now tricks Backbone into thinking the system model isNew()
3. Change the power settings and Save Changes again
<-- this step breaks, because Backbone tries to POST the entire model which does not include some necessary attributes because our JSON model for system is an ugly mess
We are actually returning bogus "id" values even when they are not null -- it is using the id of the power row instead of the system row, although it doesn't affect anything normally since we identify systems by FQDN in the API instead of by id. It's only an issue when the server gives back null as the id.
Beaker 24.3 has been released.