Skip to content

Commit

Permalink
check for blank agency first
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Jun 10, 2020
1 parent 1ed56cc commit 38dbda7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/doi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1905,9 +1905,9 @@ def set_defaults
end

def update_agency
if agency.to_s.casecmp?("datacite") || agency.blank?
if agency.blank? || agency.casecmp?("datacite")
self.agency = "datacite"
elsif agency.to_s.casecmp? ("crossref")
elsif agency.casecmp? ("crossref")
self.agency = "crossref"
end
end
Expand Down

0 comments on commit 38dbda7

Please sign in to comment.