summaryrefslogtreecommitdiff
path: root/lib/Travel/Status/DE/DBWagenreihung
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2024-04-27 14:05:06 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2024-04-27 14:05:06 +0200
commit4c6612a0656abcc930a82f2d4ea310e16186156c (patch)
tree2ac3f8127cfd589e0ac934bc71e7be73e3b3b43e /lib/Travel/Status/DE/DBWagenreihung
parent89ea4891edbebc0ae8f54212170d853625a95b5a (diff)
set wagon->group_index even if train type is unknown
Diffstat (limited to 'lib/Travel/Status/DE/DBWagenreihung')
-rw-r--r--lib/Travel/Status/DE/DBWagenreihung/Wagon.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Travel/Status/DE/DBWagenreihung/Wagon.pm b/lib/Travel/Status/DE/DBWagenreihung/Wagon.pm
index 27f2e36..646028f 100644
--- a/lib/Travel/Status/DE/DBWagenreihung/Wagon.pm
+++ b/lib/Travel/Status/DE/DBWagenreihung/Wagon.pm
@@ -203,7 +203,12 @@ sub parse_type {
sub set_traintype {
my ( $self, $group_index, $tt ) = @_;
- $self->{group_index} = $group_index;
+ $self->{group_index} = $group_index;
+
+ if ( not $tt ) {
+ return;
+ }
+
$self->{train_subtype} = $tt;
if ( not $self->{number} or not exists( $type_attributes{$tt} ) ) {