fix(procedure_presentation): find last instance of type_de_champ through coordinates
This commit is contained in:
parent
48a4e8bec5
commit
435a635b3d
1 changed files with 5 additions and 1 deletions
|
@ -293,7 +293,11 @@ class ProcedurePresentation < ApplicationRecord
|
|||
end
|
||||
|
||||
def find_type_de_champ(column)
|
||||
TypeDeChamp.order(:revision_id).find_by(stable_id: column)
|
||||
TypeDeChamp
|
||||
.joins(:revision_types_de_champ)
|
||||
.where(revision_types_de_champ: { revision_id: procedure.revisions })
|
||||
.order(:created_at)
|
||||
.find_by(stable_id: column)
|
||||
end
|
||||
|
||||
def check_allowed_displayed_fields
|
||||
|
|
Loading…
Reference in a new issue