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
|
begin
|
||||||
new_raw = InlineUploads.process(post.raw)
|
new_raw = InlineUploads.process(post.raw)
|
||||||
|
|
||||||
|
byebug
|
||||||
if post.raw != new_raw
|
if post.raw != new_raw
|
||||||
if !dry_run
|
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
|
raw: new_raw
|
||||||
},
|
},
|
||||||
|
@ -701,15 +704,16 @@ task 'posts:inline_uploads' => :environment do |_, args|
|
||||||
elsif dry_run
|
elsif dry_run
|
||||||
putc "🏃"
|
putc "🏃"
|
||||||
else
|
else
|
||||||
putc "."
|
putc "🆗"
|
||||||
end
|
end
|
||||||
|
|
||||||
fixed_count += 1
|
fixed_count += 1
|
||||||
else
|
else
|
||||||
|
putc "❌"
|
||||||
not_corrected_post_ids << post.id
|
not_corrected_post_ids << post.id
|
||||||
end
|
end
|
||||||
rescue => e
|
rescue => e
|
||||||
putc "X"
|
putc "🚫"
|
||||||
failed_to_correct_post_ids << post.id
|
failed_to_correct_post_ids << post.id
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue