From ccffe0a2706ccdfe59c3126e5172b2d4aa725fb6 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 27 Mar 2021 15:10:32 +0100 Subject: occupancy: use {train} sub-dict --- lib/DBInfoscreen/Helper/Marudor.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/DBInfoscreen/Helper/Marudor.pm b/lib/DBInfoscreen/Helper/Marudor.pm index dce22cf..0f08c46 100644 --- a/lib/DBInfoscreen/Helper/Marudor.pm +++ b/lib/DBInfoscreen/Helper/Marudor.pm @@ -92,8 +92,9 @@ sub get_efa_occupancy { sub { my ($utilization_json) = @_; - if ( $utilization_json->{$train_no}{occupancy} ) { - $promise->resolve( $utilization_json->{$train_no}{occupancy} ); + if ( $utilization_json->{train}{$train_no}{occupancy} ) { + $promise->resolve( + $utilization_json->{train}{$train_no}{occupancy} ); return; } $promise->reject; -- cgit v1.2.3