mirror of
https://github.com/discourse/discourse.git
synced 2025-02-20 18:58:10 +00:00
FIX: Do not raise if post no longer exists (#12428)
This commit is contained in:
parent
52859bdeab
commit
97623f5351
@ -304,7 +304,7 @@ module Jobs
|
||||
.where(user_id: @current_user.id)
|
||||
.where(post_action_type_id: PostActionType.types[:like])
|
||||
.each do |pa|
|
||||
post = Post.with_deleted.find(pa.post_id)
|
||||
post = Post.with_deleted.find_by(id: pa.post_id)
|
||||
yield [
|
||||
pa.id,
|
||||
pa.post_id,
|
||||
|
@ -396,6 +396,7 @@ describe Jobs::ExportUserArchive do
|
||||
PostActionCreator.like(user, post3)
|
||||
PostActionCreator.like(admin, post3)
|
||||
PostActionDestroyer.destroy(user, post3, :like)
|
||||
post3.destroy!
|
||||
|
||||
data, csv_out = make_component_csv
|
||||
expect(data.length).to eq(2)
|
||||
|
Loading…
x
Reference in New Issue
Block a user