Skip to content

Commit

Permalink
handle nil content for subject
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Jul 1, 2020
1 parent 8bfdcf3 commit b1eecbe
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion lib/bolognese/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 } ||
Expand Down
2 changes: 1 addition & 1 deletion lib/bolognese/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Bolognese
VERSION = "1.6.10"
VERSION = "1.6.11"
end

0 comments on commit b1eecbe

Please sign in to comment.