We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dec354a commit 0b887ecCopy full SHA for 0b887ec
1 file changed
db/migrate/20251128160923_update_orcids_in_profiles.rb
@@ -2,7 +2,7 @@ class UpdateOrcidsInProfiles < ActiveRecord::Migration[7.2]
2
ORCID_PREFIX = 'https://orcid.org/'.freeze
3
def up
4
Profile.where('orcid IS NOT NULL').find_each do |profile|
5
- profile.update_column(:orcid, profile.orcid.gsub(ORCID_PREFIX, ''))
+ profile.update_column(:orcid, profile.orcid.gsub(ORCID_PREFIX, '')) if profile.orcid.start_with?(ORCID_PREFIX)
6
end
7
8
0 commit comments