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
|
# gossamer threads migration-import code
|
||||||
# v0.16.4
|
# v0.16.5
|
||||||
|
|
||||||
require 'mysql2'
|
require 'mysql2'
|
||||||
require 'open-uri'
|
require 'open-uri'
|
||||||
@ -515,6 +515,11 @@ class GossamerForumsImporter < ImportScripts::Base
|
|||||||
resized_temp_file.close
|
resized_temp_file.close
|
||||||
resized_temp_file.unlink
|
resized_temp_file.unlink
|
||||||
end
|
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"
|
print "Importing files for user #{user.username}... Done.\n"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user