small comment explaining why we need to ensure used columns are present in procedure.columns

This commit is contained in:
simon lehericey 2024-11-15 16:45:32 +01:00
parent fa64e8f112
commit aa0b7f53ef
No known key found for this signature in database
GPG key ID: CDE670D827C7B3C5

View file

@ -37,6 +37,7 @@ module ColumnsConcern
columns.concat(procedure_chorus_columns) if chorusable? && chorus_configuration.complete? columns.concat(procedure_chorus_columns) if chorusable? && chorus_configuration.complete?
# ensure the columns exist in main list # ensure the columns exist in main list
# otherwise, they will be found by the find_column method
columns.filter { _1.id.in?(self.columns.map(&:id)) } columns.filter { _1.id.in?(self.columns.map(&:id)) }
end end
@ -48,6 +49,7 @@ module ColumnsConcern
columns.concat([groupe_instructeurs_id_column, followers_instructeurs_email_column]) columns.concat([groupe_instructeurs_id_column, followers_instructeurs_email_column])
# ensure the columns exist in main list # ensure the columns exist in main list
# otherwise, they will be found by the find_column method
columns.filter { _1.id.in?(self.columns.map(&:id)) } columns.filter { _1.id.in?(self.columns.map(&:id)) }
end end