FIX: Don't raise on deleted topic in UpdateHotlinkedRaw (#17901)
Fixes: ``` Job exception: undefined method `acting_user=' for nil:NilClass ``` in ``` /var/www/discourse/lib/post_revisor.rb:181:in `revise!' /var/www/discourse/app/models/post.rb:646:in `revise' /var/www/discourse/app/jobs/regular/update_hotlinked_raw.rb:24:in `execute' ```
This commit is contained in:
parent
0cbdbe3be9
commit
2361833844
|
@ -11,6 +11,7 @@ module Jobs
|
|||
post = Post.find_by(id: @post_id)
|
||||
return if post.nil?
|
||||
return if post.cook_method == Post.cook_methods[:raw_html]
|
||||
return if post.topic.nil?
|
||||
|
||||
hotlinked_map = post.post_hotlinked_media.preload(:upload).map { |r| [r.url, r] }.to_h
|
||||
|
||||
|
|
Loading…
Reference in New Issue