fix(rebase): preload revision too
This commit is contained in:
parent
b964ac6a7a
commit
47ff3086af
1 changed files with 2 additions and 1 deletions
|
@ -2,6 +2,7 @@ module DossierRebaseConcern
|
|||
extend ActiveSupport::Concern
|
||||
|
||||
def rebase!(force: false)
|
||||
ProcedureRevisionPreloader.new([procedure.published_revision, revision].compact).all
|
||||
return if procedure.published_revision.blank?
|
||||
|
||||
if force || can_rebase?
|
||||
|
@ -57,7 +58,7 @@ module DossierRebaseConcern
|
|||
.tap { _1.default = [] }
|
||||
|
||||
champs_by_stable_id = champs
|
||||
.includes(:type_de_champ)
|
||||
.joins(:type_de_champ)
|
||||
.group_by(&:stable_id)
|
||||
.transform_values { Champ.where(id: _1) }
|
||||
.tap { _1.default = Champ.none }
|
||||
|
|
Loading…
Reference in a new issue