[#2180] Do not double-expose migrated type PJ as type champ PJ
This commit is contained in:
parent
63519f04c8
commit
d01270eff2
2 changed files with 5 additions and 1 deletions
|
@ -26,7 +26,7 @@ class DossierSerializer < ActiveModel::Serializer
|
|||
has_many :champs, serializer: ChampSerializer
|
||||
|
||||
def champs
|
||||
champs = object.champs.to_a
|
||||
champs = object.champs.reject { |c| c.type_de_champ.old_pj.present? }
|
||||
|
||||
if object.expose_legacy_carto_api?
|
||||
champ_carte = champs.find do |champ|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue