Skip to content

Commit

Permalink
suggested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
cielf committed Dec 5, 2024
1 parent afea032 commit 37d32a9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions db/migrate/20241204111437_cleanup_invalid_partner_profiles.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ def up
# ActiveRecord::Base.logger = Logger.new(STDOUT)
invalid_profiles = Partners::Profile.all.reject(&:valid?)

return if !invalid_profiles
return if !invalid_profiles.present?

invalid_profiles.each do |profile|
# address invalid social media section
Expand Down Expand Up @@ -38,11 +38,11 @@ def up
if pick_up == "none" or pick_up == "na" or pick_up == "n/a" or pick_up == "see above"
profile.pick_up_email = ""
else
profile.pick_up_email.sub!("/",",")
profile.pick_up_email.sub!(";",",")
profile.pick_up_email.sub!(" or ", ", ")
profile.pick_up_email.sub!(" and ", ", ")
profile.pick_up_email.sub!(" & ", ", ")
profile.pick_up_email.gsub!("/",",")
profile.pick_up_email.gsub!(";",",")
profile.pick_up_email.gsub!(" or ", ", ")
profile.pick_up_email.gsub!(" and ", ", ")
profile.pick_up_email.gsub!(" & ", ", ")
end

if(!profile.valid?) ## If we can't fix the email, append it to the name so we don't lose the information aspect
Expand Down

0 comments on commit 37d32a9

Please sign in to comment.