Skip to content

Commit

Permalink
update get_submission_languages
Browse files Browse the repository at this point in the history
  • Loading branch information
haddadzineddine committed Jun 20, 2023
1 parent eadedd0 commit 1cb2c73
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/ontologies_linked_data/serializers/json.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ def self.get_languages(submission, user_languages)
end

def self.get_submission_languages(submission_natural_language = [])
submission_natural_language.map { |natural_language| natural_language["iso639"] && natural_language.split('/').last[0..1].to_sym }.compact
submission_natural_language = submission_natural_language.values.flatten if submission_natural_language.is_a?(Hash)
submission_natural_language.map { |natural_language| natural_language.value["iso639"] && natural_language.value.split('/').last[0..1].to_sym }.compact
end

def self.type(current_cls, hashed_obj)
Expand Down

0 comments on commit 1cb2c73

Please sign in to comment.