-
Notifications
You must be signed in to change notification settings - Fork 357
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
Fix error when clicking on created Catalog Item in the list #5481
Fix error when clicking on created Catalog Item in the list #5481
Conversation
@miq-bot add_label bug, hammer/yes |
@@ -1860,7 +1860,7 @@ def open_parent_nodes(record) | |||
parents = [:id => template_to_node_name(record)] | |||
else | |||
# Check for parent nodes missing from vandt tree and return them if any | |||
parent_rec = ServiceTemplateCatalog.find(record.service_template_catalog_id) | |||
parent_rec = ServiceTemplateCatalog.find_by_id(record.service_template_catalog_id) # nil is a valid value |
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.
Ah, miq-bot is right here, this should be find_by(:id =>
.
It will probably complain again, and not be right that time :).
fe105f4
to
507ee89
Compare
Checked commit hstastna@507ee89 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
…talog_Item Fix error when clicking on created Catalog Item in the list (cherry picked from commit 02f596a) Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1704772
Hammer backport details:
|
Fixes:
https://bugzilla.redhat.com/show_bug.cgi?id=1702343
What:
This simple PR fixes issue about displaying Catalog Item's info (also Catalog Bundle's), when clicking on the Catalog Item from the list. In our case,
nil
is a valid value so we prefer usingfind_by_id
instead of usingfind
.Steps to reproduce:
in All Service Catalog Items screen, to view its details
=> clicking on a newly created Catalog Item in the list throws an error, nothing happens in the UI, Catalog Item's summary screen is not displayed.
Note:
I need this BZ to be fixed for #5445,
otherwise it will not be possible to display Catalog Item info (with selected Tenants in the tree I am adding there) properly from the list.
Clicking on the Catalog Item from the list:
Before:
After Clicking on created Catalog Item, nothing happens:
After:
Displaying created Catalog Item's info:
Displaying Catalog Bundle's info: