procedures: fix double N+1 requests in new_from_existing
This commit is contained in:
parent
b0a9e49549
commit
592331e9ac
1 changed files with 1 additions and 0 deletions
|
@ -185,6 +185,7 @@ class Admin::ProceduresController < AdminController
|
|||
.pluck('procedures.id')
|
||||
|
||||
@grouped_procedures = Procedure
|
||||
.includes(:administrateur, :service)
|
||||
.where(id: significant_procedure_ids)
|
||||
.group_by(&:organisation_name)
|
||||
.sort_by { |_, procedures| procedures.first.created_at }
|
||||
|
|
Loading…
Reference in a new issue