diff --git a/app/models/doi.rb b/app/models/doi.rb index 7cb312d3f..362ca9d11 100644 --- a/app/models/doi.rb +++ b/app/models/doi.rb @@ -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