summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2020-02-18 17:38:53 +0100
committerDaniel Friesel <daniel.friesel@uos.de>2020-02-18 17:38:53 +0100
commit2652ea6bab56e40169334800f4b9c5a11c3ef601 (patch)
treeab4d2c4d37cf6bf93f8c990614b05d67ec37a8e2
parentcc7439dd5e051904aa03e21a7a50bda106c43ae0 (diff)
auto-checkout for cancelled departure: guard against destination changes1.14.10
-rw-r--r--lib/Travelynx/Command/work.pm14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/Travelynx/Command/work.pm b/lib/Travelynx/Command/work.pm
index 04dbd2d..727a694 100644
--- a/lib/Travelynx/Command/work.pm
+++ b/lib/Travelynx/Command/work.pm
@@ -81,9 +81,10 @@ sub run {
'in_transit',
'count(*) as count',
{
- user_id => $uid,
- train_no => $train->train_no,
- checkin_station_id => $dep
+ user_id => $uid,
+ train_no => $train->train_no,
+ checkin_station_id => $dep,
+ checkout_station_id => $arr,
}
)->hash->{count}
)
@@ -94,9 +95,10 @@ sub run {
cancelled => 1,
},
{
- user_id => $uid,
- train_no => $train->train_no,
- checkin_station_id => $dep
+ user_id => $uid,
+ train_no => $train->train_no,
+ checkin_station_id => $dep,
+ checkout_station_id => $arr,
}
);