diff options
author | Daniel Friesel <derf@finalrewind.org> | 2020-04-16 04:54:41 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2020-04-16 04:54:41 +0200 |
commit | e5f273ced3beac04dcbee92c53474361f2a300fe (patch) | |
tree | 3728dfc5d708bfc3cc155c648a11e0df0b086c40 /lib | |
parent | 4cc510d7109a371f2458628e74b9cdb664eb2465 (diff) |
ignore missing timestamps when performing a force checkout
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/Travelynx.pm | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/Travelynx.pm b/lib/Travelynx.pm index 818205f..091a382 100755 --- a/lib/Travelynx.pm +++ b/lib/Travelynx.pm @@ -806,11 +806,10 @@ sub startup { my $tx = $db->begin; - if ( defined $train ) { - - if ( not $train->arrival ) { - die("Train has no arrival timestamp\n"); - } + if ( defined $train and not $train->arrival and not $force ) { + die("Train has no arrival timestamp\n"); + } + elsif ( defined $train and $train->arrival ) { $has_arrived = $train->arrival->epoch < $now->epoch ? 1 : 0; my $json = JSON->new; |