diff options
author | Daniel Friesel <derf@finalrewind.org> | 2021-03-27 15:10:32 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2021-03-27 15:10:32 +0100 |
commit | ccffe0a2706ccdfe59c3126e5172b2d4aa725fb6 (patch) | |
tree | edce5b165d3fe081b5b1d863a0fa864f8427a1ae /lib/DBInfoscreen | |
parent | 23b538a847fbbc4f909369d30384bc2a461d865a (diff) |
occupancy: use {train} sub-dict
Diffstat (limited to 'lib/DBInfoscreen')
-rw-r--r-- | lib/DBInfoscreen/Helper/Marudor.pm | 5 |
1 files 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; |