FIX: Undefined method in `posts:inline_uploads`.
This commit is contained in:
parent
40e67971f9
commit
49b921147a
|
@ -681,9 +681,12 @@ task 'posts:inline_uploads' => :environment do |_, args|
|
|||
begin
|
||||
new_raw = InlineUploads.process(post.raw)
|
||||
|
||||
byebug
|
||||
if post.raw != new_raw
|
||||
if !dry_run
|
||||
post.revise!(Discourse.system_user,
|
||||
PostRevisor.new(post, Topic.with_deleted.find_by(id: post.topic_id))
|
||||
.revise!(
|
||||
Discourse.system_user,
|
||||
{
|
||||
raw: new_raw
|
||||
},
|
||||
|
@ -701,15 +704,16 @@ task 'posts:inline_uploads' => :environment do |_, args|
|
|||
elsif dry_run
|
||||
putc "🏃"
|
||||
else
|
||||
putc "."
|
||||
putc "🆗"
|
||||
end
|
||||
|
||||
fixed_count += 1
|
||||
else
|
||||
putc "❌"
|
||||
not_corrected_post_ids << post.id
|
||||
end
|
||||
rescue => e
|
||||
putc "X"
|
||||
putc "🚫"
|
||||
failed_to_correct_post_ids << post.id
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue