fix: coordinate_and_tdc return nil if not found

This commit is contained in:
simon lehericey 2022-07-11 22:20:51 +02:00
parent bd708a12a0
commit c4c0c275e1

View file

@ -229,7 +229,7 @@ class ProcedureRevision < ApplicationRecord
.joins(:type_de_champ) .joins(:type_de_champ)
.find_by(type_de_champ: { stable_id: stable_id }) .find_by(type_de_champ: { stable_id: stable_id })
[coordinate, coordinate.type_de_champ] [coordinate, coordinate&.type_de_champ]
end end
def renumber(siblings) def renumber(siblings)