Skip to content

Commit

Permalink
🐛 [FIX] v_treks view #4099
Browse files Browse the repository at this point in the history
  • Loading branch information
amandine-sahl committed May 16, 2024
1 parent 4bd5078 commit cf39d3e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ CHANGELOG
- Improve information about upgrading geotrek-admin version with debian
- Remove obsolete SHOW_SENSITIVE_AREAS_ON_MAP_SCREENSHOT parameter

**Bug fixes**
- Fix view `v_treks` (fixes #4099)

2.106.0 (2024-05-15)
--------------------

Expand Down
5 changes: 3 additions & 2 deletions geotrek/trekking/templates/trekking/sql/post_30_views.sql
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,12 @@ LEFT JOIN
GROUP BY topo_object_id) h_{{lang}} ON a.topo_object_id = h_{{lang}}.topo_object_id
{% endfor %}
LEFT JOIN
(SELECT a.name,
(SELECT array_to_string(ARRAY_AGG (a.name ORDER BY a.id), ',', '_') as name,
topo_object_id
FROM common_recordsource a
JOIN trekking_trek_source b ON a.id = b.recordsource_id
JOIN trekking_trek c ON b.trek_id = c.topo_object_id) i ON a.topo_object_id = i.topo_object_id
JOIN trekking_trek c ON b.trek_id = c.topo_object_id
GROUP BY topo_object_id) i ON a.topo_object_id = i.topo_object_id
LEFT JOIN
(SELECT array_to_string(ARRAY_AGG (a.url ORDER BY a.id), ',', '_') url,
d.topo_object_id
Expand Down

0 comments on commit cf39d3e

Please sign in to comment.