Skip to content

Commit

Permalink
Merge pull request #3723 from lpichler/use_where_for_set_of_ids
Browse files Browse the repository at this point in the history
Fix query to fetch more widgets
(cherry picked from commit 9d3cd60)

https://bugzilla.redhat.com/show_bug.cgi?id=1565154
  • Loading branch information
mzazrivec authored and simaishi committed Apr 9, 2018
1 parent b2a8521 commit f124b84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/report_controller/dashboards.rb
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ def db_set_record_vars

def db_save_members
widget_ids = %i(col1 col2 col3).collect { |key| @db.set_data[key] }.flatten
widgets = Array(MiqWidget.find_by(:id => widget_ids))
widgets = Array(MiqWidget.where(:id => widget_ids))

@db.replace_children(widgets)
@db.members.each { |w| w.create_initial_content_for_user(session[:userid]) } # Generate content if not there
Expand Down

0 comments on commit f124b84

Please sign in to comment.