From 24d5c247becc7554b59a7879fc38ccc7a780a47e Mon Sep 17 00:00:00 2001 From: Nicholas Gronow Date: Tue, 18 May 2021 13:25:14 -0400 Subject: [PATCH] Accomodate bad datasystem formats (#10) --- lib/reso_transport/datasystem_parser.rb | 2 +- lib/reso_transport/version.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/reso_transport/datasystem_parser.rb b/lib/reso_transport/datasystem_parser.rb index 4ad06f8..689fdd4 100644 --- a/lib/reso_transport/datasystem_parser.rb +++ b/lib/reso_transport/datasystem_parser.rb @@ -20,7 +20,7 @@ def parse(doc) # ResourcePath -> def resources - @resources ||= @json['value'].map { |v| v['Resources'] }.flatten.map { |r| [r['Name'], r] }.to_h + @resources ||= @json['value'].map { |v| v['Resources'] }.flatten.compact.map { |r| [r['Name'], r] }.to_h end end end diff --git a/lib/reso_transport/version.rb b/lib/reso_transport/version.rb index 6522a3b..eed7432 100644 --- a/lib/reso_transport/version.rb +++ b/lib/reso_transport/version.rb @@ -1,3 +1,3 @@ module ResoTransport - VERSION = '1.5.6'.freeze + VERSION = '1.5.7'.freeze end