Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

fix: PDF thumbnails missing for MCP-added places (osm_id)

jubnl2f9d7adf4ac9
diff --git a/client/src/components/PDF/TripPDF.tsx b/client/src/components/PDF/TripPDF.tsx
index e02939e53..4657fbce3 100644
--- a/client/src/components/PDF/TripPDF.tsx
+++ b/client/src/components/PDF/TripPDF.tsx
@@ -96,12 +96,12 @@ async function fetchPlacePhotos(assignments) {
const allPlaces = Object.values(assignments).flatMap(a => a.map(x => x.place)).filter(Boolean)
const unique = [...new Map(allPlaces.map(p => [p.id, p])).values()]
- const toFetch = unique.filter(p => !p.image_url && p.google_place_id)
+ const toFetch = unique.filter(p => !p.image_url && (p.google_place_id || p.osm_id))
await Promise.allSettled(
toFetch.map(async (place) => {
try {
- const data = await mapsApi.placePhoto(place.google_place_id)
+ const data = await mapsApi.placePhoto(place.google_place_id || place.osm_id)
if (data.photoUrl) photoMap[place.id] = data.photoUrl
} catch {}
})