mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 22:41:26 +08:00
Topic can have null user_id when user was nuked
This commit is contained in:
@ -25,6 +25,9 @@ class UserDestroyer
|
||||
end
|
||||
end
|
||||
PostDestroyer.new(@staff, post).destroy
|
||||
if post.topic and post.post_number == 1
|
||||
Topic.unscoped.where(id: post.topic.id).update_all(user_id: nil)
|
||||
end
|
||||
end
|
||||
raise PostsExistError if user.reload.post_count != 0
|
||||
end
|
||||
|
Reference in New Issue
Block a user