diff options
author | Daniel Friesel <derf@finalrewind.org> | 2019-06-23 16:52:50 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2019-06-23 16:52:50 +0200 |
commit | c849a88b4ef549de2810b7f0e2b544bb7e88149e (patch) | |
tree | 7441ee31a4b0d8721dc806a2a86d01143b56bba0 /lib/Travel/Status | |
parent | bafb529a0052e001ef739a98532892e9cbad1e97 (diff) |
train_number and departure are not needed when using from_json
Diffstat (limited to 'lib/Travel/Status')
-rw-r--r-- | lib/Travel/Status/DE/DBWagenreihung.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Travel/Status/DE/DBWagenreihung.pm b/lib/Travel/Status/DE/DBWagenreihung.pm index 4623225..ea37382 100644 --- a/lib/Travel/Status/DE/DBWagenreihung.pm +++ b/lib/Travel/Status/DE/DBWagenreihung.pm @@ -16,11 +16,11 @@ use Travel::Status::DE::DBWagenreihung::Wagon; sub new { my ( $class, %opt ) = @_; - if ( not $opt{train_number} ) { + if ( not $opt{train_number} and not $opt{from_json} ) { confess('train_number option must be set'); } - if ( not $opt{departure} ) { + if ( not $opt{departure} and not $opt{from_json} ) { confess('departure option must be set'); } |