Browse Source

Remove some of the N+1 query madness by preloading required organisations

pull/466/head
baarkerlounger 3 years ago
parent
commit
cec447e790
  1. 2
      app/controllers/case_logs_controller.rb

2
app/controllers/case_logs_controller.rb

@ -130,7 +130,7 @@ private
query = query.public_send("filter_by_#{category}", values) query = query.public_send("filter_by_#{category}", values)
end end
end end
query.all query.all.includes(:owning_organisation, :managing_organisation)
end end
def set_session_filters def set_session_filters

Loading…
Cancel
Save