summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2020-04-16 04:54:41 +0200
committerDaniel Friesel <derf@finalrewind.org>2020-04-16 04:54:41 +0200
commite5f273ced3beac04dcbee92c53474361f2a300fe (patch)
tree3728dfc5d708bfc3cc155c648a11e0df0b086c40 /lib
parent4cc510d7109a371f2458628e74b9cdb664eb2465 (diff)
ignore missing timestamps when performing a force checkout
Diffstat (limited to 'lib')
-rwxr-xr-xlib/Travelynx.pm9
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;