fix(transport_helper): make sure journeys contain start+endstation

This commit is contained in:
fbachus
2026-07-30 19:03:29 +02:00
parent aa9258e3af
commit cb17cb8d90
+2
View File
@@ -145,6 +145,7 @@ class Journey {
endStation = null;
duration = Duration(minutes: 0);
}
_dbUpdate();
}
void addSegment(Segment newSeg) {
@@ -224,6 +225,7 @@ class Journey {
static Future<Journey> fromMapWrapper(Map<String, Object?> journeyMap) async {
Future<List<Segment>> segs = _dbGetJourneySegments(journeyMap["id"] as int);
Journey res = Journey.fromMap(journeyMap, await segs);
res.sync();
return res;
}