Skip to content
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

Added a nil check for @record when setting ownership on a service #79

Merged

Conversation

AparnaKarve
Copy link
Contributor

@@ -401,7 +401,7 @@ def replace_right_cell(action = nil, replace_trees = [])
locals = {:record_id => @edit[:rec_id], :action_url => action_url}
if action == "ownership"
locals[:multi_record] = true # need save/cancel buttons on edit screen even tho @record.id is not there
locals[:record_id] = @record.id
locals[:record_id] = @record ? @record.id : nil

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AparnaKarve I think this could be:

locals[:record_id] = @record.try(:id)

Deleted unnecessary code where @record.id was being passed to locals
while setting ownership on a service

https://bugzilla.redhat.com/show_bug.cgi?id=1110971
@AparnaKarve
Copy link
Contributor Author

@dclarizio As discussed, deleted the unnecessary locals[:record_id] = @record.id line.
Please review.

@miq-bot
Copy link
Member

miq-bot commented Jun 24, 2014

Checked commit AparnaKarve@9f9840c with rubocop 0.21.0
0 files checked, 0 offenses detected
Everything looks good. 🍰

dclarizio pushed a commit that referenced this pull request Jun 24, 2014
Added a nil check for @record when setting ownership on a service
@dclarizio dclarizio merged commit 50fcc56 into ManageIQ:master Jun 24, 2014
@AparnaKarve AparnaKarve deleted the bz1110971_set_service_ownership branch July 21, 2014 22:46
d-m-u added a commit to d-m-u/manageiq that referenced this pull request Jun 29, 2020
more core ext's on 4.1.0

update for update sake

https://github.com/ManageIQ/more_core_extensions/compare/179bf40..e5b4501
 - Added Ruby 2.7 support [[ManageIQ#79](ManageIQ/more_core_extensions#79)]
 - Added Process#pause, Process#resume, and Process#alive? [[ManageIQ#73](ManageIQ/more_core_extensions#73)]

array added * `#compact_map` - Collect non-nil results from the block
array added `#tabular_sort` - Sorts an Array of Hashes by specific columns

hierarchy added `#descendant_get` - Returns the descendant with a given name

the two breaking changes:
- **BREAKING**: Moved Object#descendant_get to Class#descendant_get [[ManageIQ#75](ManageIQ/more_core_extensions#75)]
- **BREAKING**: Removed deprecated Enumerable#stable_sort_by [[ManageIQ#76](ManageIQ/more_core_extensions#76)]

a minor header output change was made that hasn't been released yet to make tableize more markdown compliant

see ManageIQ/linux_admin#221
d-m-u added a commit to d-m-u/manageiq that referenced this pull request Jul 14, 2020
more core ext's on 4.1.0

update for update sake

https://github.com/ManageIQ/more_core_extensions/compare/179bf40..e5b4501
 - Added Ruby 2.7 support [[ManageIQ#79](ManageIQ/more_core_extensions#79)]
 - Added Process#pause, Process#resume, and Process#alive? [[ManageIQ#73](ManageIQ/more_core_extensions#73)]

array added * `#compact_map` - Collect non-nil results from the block
array added `#tabular_sort` - Sorts an Array of Hashes by specific columns

hierarchy added `#descendant_get` - Returns the descendant with a given name

the two breaking changes:
- **BREAKING**: Moved Object#descendant_get to Class#descendant_get [[ManageIQ#75](ManageIQ/more_core_extensions#75)]
- **BREAKING**: Removed deprecated Enumerable#stable_sort_by [[ManageIQ#76](ManageIQ/more_core_extensions#76)]

a minor header output change was made that hasn't been released yet to make tableize more markdown compliant

see ManageIQ/linux_admin#221
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants