From fae5a2f8b24ce55ddd01ba04df0107231aec0b53 Mon Sep 17 00:00:00 2001 From: Joaquim Nallar Date: Fri, 6 Dec 2024 23:46:12 +0100 Subject: [PATCH] =?UTF-8?q?test=20fix=20pb=20page=20d'acceuil=20(trop=20lo?= =?UTF-8?q?ng=20a=20affich=C3=A9=20donc=20erreur=20502)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vmObservationsMaillesRepository.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/atlas/modeles/repositories/vmObservationsMaillesRepository.py b/atlas/modeles/repositories/vmObservationsMaillesRepository.py index f04820a5f..df7f30d2f 100644 --- a/atlas/modeles/repositories/vmObservationsMaillesRepository.py +++ b/atlas/modeles/repositories/vmObservationsMaillesRepository.py @@ -124,21 +124,20 @@ def getObservationsMaillesChilds(session, cd_ref, year_min=None, year_max=None): def territoryObservationsMailles(connection): sql = """ -SELECT obs.cd_ref, obs.id_maille, obs.nbr,-- obs.annee, obs.id_observations, +SELECT obs.cd_ref, obs.id_maille, obs.nbr, obs.type_code, tax.lb_nom, tax.nom_vern, tax.group2_inpn, medias.url, medias.chemin, medias.id_media, - m.geojson_4326 AS geom, - m.type_code + st_asgeojson(m.geojson_maille) AS geom FROM atlas.vm_observations_mailles obs JOIN atlas.vm_taxons tax ON tax.cd_ref = obs.cd_ref - JOIN (SELECT DISTINCT id_area, geojson_4326, type_code from atlas.vm_cor_area_synthese) m ON m.id_area=obs.id_maille + JOIN atlas.t_mailles_territoire m ON m.id_maille=obs.id_maille LEFT JOIN atlas.vm_medias medias ON medias.cd_ref = obs.cd_ref AND medias.id_type = 1 - GROUP BY obs.cd_ref, obs.id_maille, obs.nbr, - tax.lb_nom, tax.nom_vern, tax.group2_inpn, - medias.url, medias.chemin, medias.id_media, - m.geojson_4326, - m.type_code +GROUP BY obs.cd_ref, obs.id_maille, obs.nbr, + tax.lb_nom, tax.nom_vern, tax.group2_inpn, + medias.url, medias.chemin, medias.id_media, + m.geojson_maille, + obs.type_code """ observations = connection.execute(text(sql))