mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Ignore errors when remapping posts
This commit is contained in:
@@ -138,9 +138,13 @@ def remap_posts(find, type, replace = "")
|
||||
end
|
||||
|
||||
if new_raw != p.raw
|
||||
p.revise(Discourse.system_user, { raw: new_raw }, bypass_bump: true, skip_revision: true)
|
||||
putc "."
|
||||
i += 1
|
||||
begin
|
||||
p.revise(Discourse.system_user, { raw: new_raw }, bypass_bump: true, skip_revision: true)
|
||||
putc "."
|
||||
i += 1
|
||||
rescue
|
||||
puts "\nFailed to remap post (topic_id: #{p.topic_id}, post_id: #{p.id})\n"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user