Skip to content

Commit

Permalink
update new type column
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Aug 19, 2020
1 parent 6ebfdf9 commit 72c2a31
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion app/models/doi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1924,8 +1924,34 @@ def set_defaults
def update_agency
if agency.blank? || agency.casecmp?("datacite")
self.agency = "datacite"
elsif agency.casecmp? ("crossref")
self.type = "DataciteDoi"
elsif agency.casecmp?("crossref")
self.agency = "crossref"
self.type = "OtherDoi"
elsif agency.casecmp?("kisti")
self.agency = "kisti"
self.type = "OtherDoi"
elsif agency.casecmp?("medra")
self.agency = "medra"
self.type = "OtherDoi"
elsif agency.casecmp?("istic")
self.agency = "istic"
self.type = "OtherDoi"
elsif agency.casecmp?("jalc")
self.agency = "jalc"
self.type = "OtherDoi"
elsif agency.casecmp?("airiti")
self.agency = "airiti"
self.type = "OtherDoi"
elsif agency.casecmp?("cnki")
self.agency = "cnki"
self.type = "OtherDoi"
elsif agency.casecmp?("op")
self.agency = "op"
self.type = "OtherDoi"
else
self.agency = "datacite"
self.type = "DataciteDoi"
end
end

Expand Down

0 comments on commit 72c2a31

Please sign in to comment.