From b1eecbe47b95506c8a6d7b057e16bf36d84ef737 Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Wed, 1 Jul 2020 22:05:42 +0200 Subject: [PATCH] handle nil content for subject --- Gemfile.lock | 6 +++--- lib/bolognese/utils.rb | 2 +- lib/bolognese/version.rb | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index d8d760bc..9d7363b9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - bolognese (1.6.10) + bolognese (1.6.11) activesupport (>= 4.2.5) benchmark_methods (~> 0.7) bibtex-ruby (>= 5.1.0) @@ -56,7 +56,7 @@ GEM namae (~> 1.0) csl-styles (1.0.1.10) csl (~> 1.0) - diff-lcs (1.4.3) + diff-lcs (1.4.4) docile (1.3.2) ebnf (1.2.0) rdf (~> 3.1) @@ -128,7 +128,7 @@ GEM rack-test (0.8.3) rack (>= 1.0, < 3) rake (12.3.3) - rdf (3.1.3) + rdf (3.1.4) hamster (~> 3.0) link_header (~> 0.0, >= 0.0.8) rdf-aggregate-repo (3.1.0) diff --git a/lib/bolognese/utils.rb b/lib/bolognese/utils.rb index da5be895..de86736b 100644 --- a/lib/bolognese/utils.rb +++ b/lib/bolognese/utils.rb @@ -1200,7 +1200,7 @@ def hsh_to_fos(hsh) # try to extract forId if hsh["subjectScheme"] == "FOR" - for_id = hsh["__content__"].split(" ").first || hsh["subject"].split(" ").first + for_id = hsh["__content__"].to_s.split(" ").first || hsh["subject"].to_s.split(" ").first for_id = for_id.rjust(6, "0") subject = for_fields.find { |l| l["forId"] == for_id } || diff --git a/lib/bolognese/version.rb b/lib/bolognese/version.rb index 881d1c61..6b361c1f 100644 --- a/lib/bolognese/version.rb +++ b/lib/bolognese/version.rb @@ -1,3 +1,3 @@ module Bolognese - VERSION = "1.6.10" + VERSION = "1.6.11" end