summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-06-23 16:52:50 +0200
committerDaniel Friesel <derf@finalrewind.org>2019-06-23 16:52:50 +0200
commitc849a88b4ef549de2810b7f0e2b544bb7e88149e (patch)
tree7441ee31a4b0d8721dc806a2a86d01143b56bba0 /lib
parentbafb529a0052e001ef739a98532892e9cbad1e97 (diff)
train_number and departure are not needed when using from_json
Diffstat (limited to 'lib')
-rw-r--r--lib/Travel/Status/DE/DBWagenreihung.pm4
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');
}