summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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');
}