v0.16.5 Remove duplicate images from user_profile.bio_raw
This commit is contained in:
parent
04bca84117
commit
a94dfbb550
@ -1,5 +1,5 @@
|
||||
# gossamer threads migration-import code
|
||||
# v0.16.4
|
||||
# v0.16.5
|
||||
|
||||
require 'mysql2'
|
||||
require 'open-uri'
|
||||
@ -515,6 +515,11 @@ class GossamerForumsImporter < ImportScripts::Base
|
||||
resized_temp_file.close
|
||||
resized_temp_file.unlink
|
||||
end
|
||||
|
||||
# Check for and remove exact duplicate image markdown strings
|
||||
user.user_profile.bio_raw = user.user_profile.bio_raw.split("\n\n").uniq.join("\n\n")
|
||||
user.user_profile.save!
|
||||
|
||||
print "Importing files for user #{user.username}... Done.\n"
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user