Skip to content

Commit

Permalink
test fix pb page d'acceuil (trop long a affiché donc erreur 502)
Browse files Browse the repository at this point in the history
  • Loading branch information
juggler31 committed Dec 6, 2024
1 parent fcc3f4d commit fae5a2f
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions atlas/modeles/repositories/vmObservationsMaillesRepository.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit fae5a2f

Please sign in to comment.