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
Add UUID to insights facets that are missing it #571
Conversation
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.
One suggestion, but it might be down to personal taste. Otherwise looks good
| missing_uuids = existing_facets.select { |host_id, uuid| uuid.empty? }.map(&:first) | ||
|
|
||
| missing_uuids.each do |host_id| | ||
| InsightsFacet.where(host_id: host_id).update_all(uuid: uuids_hash[host_id]) |
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.
How about something like this this?
| missing_uuids = existing_facets.select { |host_id, uuid| uuid.empty? }.map(&:first) | |
| missing_uuids.each do |host_id| | |
| InsightsFacet.where(host_id: host_id).update_all(uuid: uuids_hash[host_id]) | |
| missing_uuids = existing_facets.select { |host_id, uuid| uuid.empty? }.each do |host_id, uuid| | |
| InsightsFacet.where(host_id: host_id).update_all(uuid: uuid) |
|
@adamruzicka Done! |
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.
Thanks @ShimShtein !
* Add UUID to insights facets that are missing it * Review fixes
* Add UUID to insights facets that are missing it * Review fixes
No description provided.