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
Don't throw exception when template is not found in Provisioning #5345
Conversation
@miq-bot add_label bug |
Checked commit PanSpagetka@c00ac93 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
end | ||
@record = | ||
if @edit[:new][:src_configured_system_ids].present? | ||
PhysicalServer.where(:id => @edit[:new][:src_configured_system_ids].first).first |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe take
is semantically more accurate instead of first
, but I leave the decision to you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't throw exception when template is not found in Provisioning (cherry picked from commit e7b0336) Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1693740
Hammer backport details:
|
In #3928 was added tooltip for Volume tab in provision form. However, this sometimes causes problems when Template is not found and breaks the form. Because Provision form is used for multiple usecases (Provision, Clone, Publish,...?) and it is not clear when it could fail I think safest solution is just wrap it in try-catch block. I am not very satisfied with this, but it fixes the issue and it doesn't add to much complexity.
Links [Optional]
https://bugzilla.redhat.com/show_bug.cgi?id=1687946
Related PRs:
#3928
#4511
Steps for Testing/QA [Optional]
Try to Provision, Clone, Publish VM
ping @skateman