diff --git a/Gemfile.lock b/Gemfile.lock index e9c995fe..fc169be3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,6 @@ GIT remote: https://github.com/ncbo/goo.git - revision: d6b84e12d61317dbddc1b86cb1451acb37915369 + revision: a27d6ca79d47eb045b1bdfe311531827428aa504 branch: multilingual_preflabels specs: goo (0.0.2) @@ -69,7 +69,7 @@ GEM domain_name (~> 0.5) i18n (0.9.5) concurrent-ruby (~> 1.0) - json (2.7.2) + json (2.7.3) json_pure (2.7.2) language_server-protocol (3.17.0.3) launchy (3.0.1) @@ -146,7 +146,7 @@ GEM http-cookie (>= 1.0.2, < 2.0) mime-types (>= 1.16, < 4.0) netrc (~> 0.8) - rexml (3.3.8) + rexml (3.3.9) rsolr (2.6.0) builder (>= 2.1.2) faraday (>= 0.9, < 3, != 2.0.0) diff --git a/lib/ontologies_linked_data/services/submission_process/operations/submission_rdf_generator.rb b/lib/ontologies_linked_data/services/submission_process/operations/submission_rdf_generator.rb index b7daa7ea..4480e741 100644 --- a/lib/ontologies_linked_data/services/submission_process/operations/submission_rdf_generator.rb +++ b/lib/ontologies_linked_data/services/submission_process/operations/submission_rdf_generator.rb @@ -195,8 +195,10 @@ def generate_missing_labels_each(artifacts = {}, logger, paging, page_classes, p if prefLabel_lang.nil? || no_default_prefLabel lang_rdfs_labels = c.label(include_languages: true) + lang_rdfs_labels = {none: []} if lang_rdfs_labels.to_a.empty? || - (no_default_prefLabel && (lang_rdfs_labels.keys & [portal_lang, :none]).empty?) + lang_rdfs_labels.is_a?(Array) || + (no_default_prefLabel && lang_rdfs_labels.is_a?(Hash) && (lang_rdfs_labels.keys & [portal_lang, :none]).empty?) lang_rdfs_labels.each do |lang, rdfs_labels| if rdfs_labels && rdfs_labels.length > 1 && c.synonym.length > 0 diff --git a/lib/ontologies_linked_data/utils/ontology_csv_writer.rb b/lib/ontologies_linked_data/utils/ontology_csv_writer.rb index 7a0c2c0b..7fbb0a6d 100644 --- a/lib/ontologies_linked_data/utils/ontology_csv_writer.rb +++ b/lib/ontologies_linked_data/utils/ontology_csv_writer.rb @@ -32,6 +32,7 @@ def write_header(ont) end def write_class(ont_class) + ont_class.bring_remaining row = CSV::Row.new(@headers, Array.new(@headers.size), false) # ID