fix(journey): prevent duplicate skeleton entries for multi-day places (#606)

When syncing trip places to journal, places assigned to multiple days
(e.g. multi-night hotels) produced one skeleton entry per day_assignment
row. The existing dedup check only looked at DB state, not at entries
added within the same sync loop. Add the place ID to the tracking set
after insertion so the same place is never inserted twice.
This commit is contained in:
Maurice
2026-04-13 20:27:48 +02:00
parent 149aa4c5e2
commit 33c63d34e7
+1
View File
@@ -261,6 +261,7 @@ export function syncTripPlaces(journeyId: number, tripId: number, authorId: numb
for (const place of places) {
if (existingPlaceIds.has(place.id)) continue;
existingPlaceIds.add(place.id);
const entryDate = place.day_date || new Date().toISOString().split('T')[0];
const entryTime = place.assignment_time || place.place_time || null;