From 40a1eaaaed7f740b51fa988576b603b6329c8db4 Mon Sep 17 00:00:00 2001 From: Colin Darie Date: Wed, 7 Dec 2022 09:46:45 +0100 Subject: [PATCH] fix(annuaire-education): schema should not require adresse_1, type_contrat_prive attributes https://sentry.io/organizations/demarches-simplifiees/issues/3328955794/events/147affe4b73b43a391c257b97d298bb9/?project=1429550 --- app/schemas/etablissement-annuaire-education.json | 2 -- app/views/shared/champs/annuaire_education/_show.html.haml | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/schemas/etablissement-annuaire-education.json b/app/schemas/etablissement-annuaire-education.json index 0ed7e6c96..78ed2839a 100644 --- a/app/schemas/etablissement-annuaire-education.json +++ b/app/schemas/etablissement-annuaire-education.json @@ -167,14 +167,12 @@ "required": [ "identifiant_de_l_etablissement", "nom_etablissement", - "type_contrat_prive", "nom_commune", "code_commune", "libelle_academie", "code_academie", "libelle_nature", "code_nature", - "adresse_1", "code_postal", "libelle_region", "code_region" diff --git a/app/views/shared/champs/annuaire_education/_show.html.haml b/app/views/shared/champs/annuaire_education/_show.html.haml index 18e458621..24d41c4a5 100644 --- a/app/views/shared/champs/annuaire_education/_show.html.haml +++ b/app/views/shared/champs/annuaire_education/_show.html.haml @@ -35,7 +35,8 @@ %tr %th.libelle Adresse : %td - = champ.data['adresse_1'] + - if champ.data['adresse_1'].present? + = champ.data['adresse_1'] %br = "#{champ.data['code_postal']} #{champ.data['nom_commune']}" %br