summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2024-10-03 20:24:46 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2024-10-03 20:24:46 +0200
commit669aa8b72cdf6d57d6f5f35d50f2a7e2489478e4 (patch)
tree31043e9bf97606dd8db5513a8b0e2379e934c7df
parent85b8fa9655490cb0a8a35c83f61d05bf6a355cf2 (diff)
Trip->TO_JSON: Ensure that route is present
-rw-r--r--lib/Travel/Status/DE/EFA/Trip.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Travel/Status/DE/EFA/Trip.pm b/lib/Travel/Status/DE/EFA/Trip.pm
index e6c1b8e..37e5284 100644
--- a/lib/Travel/Status/DE/EFA/Trip.pm
+++ b/lib/Travel/Status/DE/EFA/Trip.pm
@@ -109,6 +109,9 @@ sub route {
sub TO_JSON {
my ($self) = @_;
+ # lazy loading
+ $self->route;
+
my $ret = { %{$self} };
delete $ret->{strptime_obj};