Skip to content

Commit

Permalink
sneaky asterisk I missed before
Browse files Browse the repository at this point in the history
  • Loading branch information
ahamelers committed Oct 10, 2024
1 parent 96c9672 commit 06f8bea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/stash_datacite/authors_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,15 @@ def process_affiliation
else
# - find by name otherwise
affil = StashDatacite::Affiliation.where(long_name: name).first
affil = StashDatacite::Affiliation.where(long_name: "#{name}*").first unless affil.present?
affil = StashDatacite::Affiliation.where(long_name: name.to_s).first unless affil.present?
end

# if no matching affils found, make a new affil
if affil.blank?
affil = if ror_val.present?
StashDatacite::Affiliation.create(long_name: name, ror_id: ror_val)
else
StashDatacite::Affiliation.create(long_name: "#{name}*", ror_id: nil)
StashDatacite::Affiliation.create(long_name: name.to_s, ror_id: nil)
end
end
return if @author.affiliation == affil
Expand Down

0 comments on commit 06f8bea

Please sign in to comment.