summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2023-07-13 21:08:12 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2023-07-13 21:08:12 +0200
commit5e74e35dfe9b2461528c85cf1510c56192336073 (patch)
treedd426e0b01ce6d813c6792f3485af65d8a8c65a2 /lib
parent83df6f41e241960213bcaf318802ef81c448cf60 (diff)
get_pushable_accounts: obtain all values from in_transit_str
Diffstat (limited to 'lib')
-rw-r--r--lib/Travelynx/Model/Traewelling.pm15
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/Travelynx/Model/Traewelling.pm b/lib/Travelynx/Model/Traewelling.pm
index a388ae2..1939374 100644
--- a/lib/Travelynx/Model/Traewelling.pm
+++ b/lib/Travelynx/Model/Traewelling.pm
@@ -213,18 +213,17 @@ sub get_pushable_accounts {
my $res = $self->{pg}->db->query(
qq{select t.user_id as uid, t.token as token, t.data as data,
i.user_data as user_data,
- i.checkin_station_id as dep_eva, i.checkout_station_id as arr_eva,
+ i.dep_eva as dep_eva, i.arr_eva as arr_eva,
i.data as journey_data, i.train_type as train_type,
i.train_line as train_line, i.train_no as train_no,
- extract(epoch from i.checkin_time) as checkin_ts,
- extract(epoch from i.sched_departure) as dep_ts,
- extract(epoch from i.sched_arrival) as arr_ts,
- i_str.effective_visibility as visibility
+ i.checkin_ts as checkin_ts,
+ i.sched_dep_ts as dep_ts,
+ i.sched_arr_ts as arr_ts,
+ i.effective_visibility as visibility
from traewelling as t
- join in_transit as i on t.user_id = i.user_id
- join in_transit_str as i_str on t.user_id = i_str.user_id
+ join in_transit_str as i on t.user_id = i.user_id
where t.push_sync = True
- and i.checkout_station_id is not null
+ and i.arr_eva is not null
and i.cancelled = False
}
);