From 03637872831bee884487bc0e4117a79e7451818f Mon Sep 17 00:00:00 2001 From: saint Date: Wed, 11 Sep 2024 15:32:02 +1000 Subject: [PATCH] v0.2 Address where due to import issues there are some stray PostCustomField records for Posts that do not exist. --- softdeldeletedposts.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/softdeldeletedposts.rb b/softdeldeletedposts.rb index 515587f..737f702 100644 --- a/softdeldeletedposts.rb +++ b/softdeldeletedposts.rb @@ -169,14 +169,14 @@ class GossamerForumsSoftDelDeletedPosts < ImportScripts::Base post = post_custom_field.post if post + puts "DELETING POST: SoftDelDeletedPosts: Soft deleting post with id: #{post.id} and user_id: #{post.user_id} and topic_id: #{post.topic_id}" # Get the post's owner and topic information - user = User.find_by(id: post.user_id) # Fetch user details - topic = Topic.find_by(id: post.topic_id) # Fetch topic details +# user = User.find_by(id: post.user_id) # Fetch user details +# topic = Topic.find_by(id: post.topic_id) # Fetch topic details # Display post, user, and topic information - puts "DELETING POST: SoftDelDeletedPosts: Soft deleting post with id: #{post.id}" - puts " - Post owner: #{user.username} (ID: #{user.id})" - puts " - Topic title: '#{topic.title}' (Topic ID: #{topic.id})" +# puts " - Post owner: #{user.username} (ID: #{user.id})" +# puts " - Topic title: '#{topic.title}' (Topic ID: #{topic.id})" # Soft delete the post if not already deleted soft_delete_post(post, deleted_by_id)