summaryrefslogtreecommitdiff
path: root/lib/DBInfoscreen
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2021-03-27 15:10:32 +0100
committerDaniel Friesel <derf@finalrewind.org>2021-03-27 15:10:32 +0100
commitccffe0a2706ccdfe59c3126e5172b2d4aa725fb6 (patch)
treeedce5b165d3fe081b5b1d863a0fa864f8427a1ae /lib/DBInfoscreen
parent23b538a847fbbc4f909369d30384bc2a461d865a (diff)
occupancy: use {train} sub-dict
Diffstat (limited to 'lib/DBInfoscreen')
-rw-r--r--lib/DBInfoscreen/Helper/Marudor.pm5
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;