summaryrefslogtreecommitdiff
path: root/lib/Travelynx/Controller/Traveling.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Travelynx/Controller/Traveling.pm')
-rwxr-xr-xlib/Travelynx/Controller/Traveling.pm14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/Travelynx/Controller/Traveling.pm b/lib/Travelynx/Controller/Traveling.pm
index dee6c1f..90f858c 100755
--- a/lib/Travelynx/Controller/Traveling.pm
+++ b/lib/Travelynx/Controller/Traveling.pm
@@ -1473,6 +1473,13 @@ sub yearly_history {
before => $interval_end,
with_datetime => 1
);
+
+ if ( not @journeys ) {
+ $self->render( 'not_found',
+ message => 'Keine Zugfahrten im angefragten Jahr gefunden.' );
+ return;
+ }
+
$stats = $self->journeys->get_stats(
uid => $self->current_user->{id},
year => $year
@@ -1534,6 +1541,13 @@ sub monthly_history {
before => $interval_end,
with_datetime => 1
);
+
+ if ( not @journeys ) {
+ $self->render( 'not_found',
+ message => 'Keine Zugfahrten im angefragten Monat gefunden.' );
+ return;
+ }
+
$stats = $self->journeys->get_stats(
uid => $self->current_user->{id},
year => $year,