From 2c6890f869356a48482839b8c394064777abf07f Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Sun, 15 Jun 2025 19:06:44 +0200 Subject: EFA: Handle check-ins into cancelled departures Note that this bumps the EFA dependency to 3.10 (which is just being released) Arrival cancellations are still on the to-do list --- cpanfile | 2 +- lib/Travelynx/Model/InTransit.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cpanfile b/cpanfile index 617336c..2c8979b 100644 --- a/cpanfile +++ b/cpanfile @@ -17,7 +17,7 @@ requires 'Mojolicious::Plugin::OAuth2'; requires 'Mojo::Pg'; requires 'Text::CSV'; requires 'Text::Markdown'; -requires 'Travel::Status::DE::EFA'; +requires 'Travel::Status::DE::EFA', '>= 3.10'; requires 'Travel::Status::MOTIS', '>= 0.01'; requires 'Travel::Status::DE::DBRIS', '>= 0.10'; requires 'Travel::Status::DE::HAFAS', '>= 6.20'; diff --git a/lib/Travelynx/Model/InTransit.pm b/lib/Travelynx/Model/InTransit.pm index b845c57..e2ab7f5 100644 --- a/lib/Travelynx/Model/InTransit.pm +++ b/lib/Travelynx/Model/InTransit.pm @@ -170,7 +170,7 @@ sub add { 'in_transit', { user_id => $uid, - cancelled => 0, # TODO + cancelled => $stop->is_cancelled ? 1 : 0, checkin_station_id => $stop->id_num, checkin_time => $now, dep_platform => $stop->platform, -- cgit v1.2.3