Skip to content

Fixes #3822: device bay edit #3823

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

Closed
wants to merge 4 commits into from
Closed

Fixes #3822: device bay edit #3823

wants to merge 4 commits into from

Conversation

hSaria
Copy link
Contributor

@hSaria hSaria commented Jan 2, 2020

Fixes: #3822

The edit form for the device bay was missing installed_device as a hidden input field.

When fixing the above issue, I noticed that there was a logic issue in the model of DeviceBay in that it did not allow updates once created and a device is installed because of the current_bay of the installed device condition. This was fixed by allowing the update to go through if the current_bay is the bay to be updated, or, stated differently, fail if current_bay is not the bay to be updated.

You could also exclude self from the query for current_bay. Not sure which is the better approach.

hSaria added 3 commits January 2, 2020 12:51
If the current_bay of the installed device is the same as self, then the operation is a valid update.
@hSaria hSaria changed the title Fixes 3822: device bay edit Fixes #3822: device bay edit Jan 2, 2020
@hSaria
Copy link
Contributor Author

hSaria commented Jan 2, 2020

No longer needed; fixed in 395f23e.

@hSaria hSaria closed this Jan 2, 2020
@hSaria hSaria deleted the 3822-device-bay-edit branch January 2, 2020 20:23
@lock lock bot locked as resolved and limited conversation to collaborators Apr 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"'DeviceBayForm' has no field named 'installed_device'" when trying to edit device bay details with an installed device in it
1 participant