summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
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;