Skip to content

Commit

Permalink
handle doi import error
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Nov 24, 2019
1 parent 9f65ad1 commit d3a9b58
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/doi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,7 @@ def current_media
end

def resource_type
cached_resource_type_response(types["resourceTypeGeneral"].underscore.dasherize.downcase) if types.to_h["resourceTypeGeneral"].present?
cached_resource_type_response(types["resourceTypeGeneral"].underscore.dasherize.downcase) if types.is_a?(Hash) && types["resourceTypeGeneral"].present?
end

def date_registered
Expand Down

0 comments on commit d3a9b58

Please sign in to comment.