Skip to content

Commit

Permalink
tag labels by none if they are not tagged with language tags
Browse files Browse the repository at this point in the history
  • Loading branch information
Bilelkihal committed Jan 22, 2025
1 parent 0aa6219 commit 8086bfd
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ def generate_missing_labels_each(artifacts = {}, logger, paging, page_classes, p
if no_default_pref_label
lang_rdfs_labels = c.label(include_languages: true)

lang_rdfs_labels = {none: lang_rdfs_labels} if lang_rdfs_labels.is_a?(Array) && !lang_rdfs_labels.blank?

# Set lang_rdfs_labels to { none: [] } if empty or no match for default label
if Array(lang_rdfs_labels).empty? || (lang_rdfs_labels.keys & [portal_lang, :none, '@none']).empty?
lang_rdfs_labels = { none: [] }
Expand Down

0 comments on commit 8086bfd

Please sign in to comment.