Various fixes to support posts with no user (PR #8877)


You’ve signed the CLA, udan11. Thank you! This pull request is ready for review.

Do you know when this could be happening? When are we deleting an user but forgetting to delete topic_links records?

As part of the post processing pipeline we are calling TopicLink.extract_from. When processing a post with no user, that method will raise an exception as it attempts to create TopicLink records (because user_id is nil).

Maybe we should instead bypass the post processing altogether if there are no user associated to a post?

I do not think it makes sense skipping post processing because some things may not work anymore, but I made it skip TopicLink creation which was the problem in the first place.

I think this is good to merge. Overall looks like it adds a fair bit of safety.

1 Like

@udan11 please merge when you are around to see through any bugs, perhaps the beginning of a day.

1 Like