From 87c297a17ff58fc11efdaa368cc738520b865a65 Mon Sep 17 00:00:00 2001 From: Guillaume Grossetie Date: Sun, 25 Feb 2024 16:14:31 +0100 Subject: [PATCH] CONSOMMATIONENERGETIQUE optional --- tasks/pericles.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/pericles.js b/tasks/pericles.js index bc72aac3..4dbf3ca1 100644 --- a/tasks/pericles.js +++ b/tasks/pericles.js @@ -200,7 +200,7 @@ async function getPropertiesFromXml(xmlFile) { property.withPostalCode(p['LOCALISATION']['CODE_POSTAL']) if (category === 'maison' || category === "appartement") { const detail = p['MAISON'] || p['APPARTEMENT'] - property.withEnergyConsumptionClass(detail['CONSOMMATIONENERGETIQUE']) + property.withEnergyConsumptionClass('CONSOMMATIONENERGETIQUE' in detail && detail['CONSOMMATIONENERGETIQUE']) property.withGES(detail['GAZEFFETDESERRE']) property.withFloorArea(detail['SURFACE_HABITABLE']) property.withRooms(detail['NBRE_CHAMBRES'])