Commit c849a88b authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

train_number and departure are not needed when using from_json

parent bafb529a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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');
	}