Skip to content

Commit

Permalink
remove obsolete references to doi_id. #402
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Jan 28, 2020
1 parent 9ff0244 commit 1198f95
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/jobs/affiliation_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def perform(doi_id)

doi.__elasticsearch__.index_document
else
Rails.logger.error "[Affiliation] Error updaing DOI " + doi_id + ": not found"
Rails.logger.error "[Affiliation] Error updating DOI " + doi_id + ": not found"
end
end
end
6 changes: 3 additions & 3 deletions app/models/event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class Event < ActiveRecord::Base
cache_key: { type: :keyword }
}
indexes :source_id, type: :keyword
indexes :doi_id, type: :keyword
# indexes :doi_id, type: :keyword
indexes :source_token, type: :keyword
indexes :message_action, type: :keyword
indexes :relation_type_id, type: :keyword
Expand Down Expand Up @@ -171,7 +171,7 @@ def as_indexed_json(options = {})
"subtype" => subtype,
"citation_type" => citation_type,
"source_id" => source_id,
"doi_id" => doi_id,
# "doi_id" => doi_id,
"source_token" => source_token,
"message_action" => message_action,
"relation_type_id" => relation_type_id,
Expand Down Expand Up @@ -592,7 +592,7 @@ def set_defaults
self.obj = obj.to_h.merge("id" => self.obj_id)

# set doi_id for views and downloads
self.doi_id = doi_from_url(obj_id) if source_id == "datacite-usage"
# self.doi_id = doi_from_url(obj_id) if source_id == "datacite-usage"

self.total = 1 if total.blank?
self.relation_type_id = "references" if relation_type_id.blank?
Expand Down

0 comments on commit 1198f95

Please sign in to comment.