Unverified Commit 5720802d authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

Location: Distinguish between sched(?)_platform and rt_platform

parent 12cda626
Loading
Loading
Loading
Loading
+15 −14
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@ our $VERSION = '0.01';

Travel::Status::DE::DBRIS::Location->mk_ro_accessors(
	qw(eva id lat lon name products type is_cancelled is_additional is_separation display_priority
	  dep arr platform
	  dep arr platform sched_platform rt_platform
	)
);

@@ -29,7 +29,7 @@ sub new {
		type           => $json->{type},
		is_cancelled   => $json->{canceled},
		is_additional  => $json->{additional},
		platform      => $json->{gleis},
		sched_platform => $json->{gleis},
		rt_platform    => $json->{ezGleis},
	};

@@ -52,6 +52,7 @@ sub new {

	$ref->{arr}      = $ref->{rt_arr}      // $ref->{sched_arr};
	$ref->{dep}      = $ref->{rt_dep}      // $ref->{sched_dep};
	$ref->{platform} = $ref->{rt_platform} // $ref->{sched_platform};

	bless( $ref, $obj );