diff --git a/app/jobs/regular/export_csv_file.rb b/app/jobs/regular/export_csv_file.rb index 0382089cdf9..c0b86a7f92b 100644 --- a/app/jobs/regular/export_csv_file.rb +++ b/app/jobs/regular/export_csv_file.rb @@ -132,6 +132,10 @@ module Jobs user_archive_array = [] topic_data = user_archive.topic user_archive = user_archive.as_json + if topic_data.nil? + # deleted topic + topic_data = Topic.with_deleted.find_by(id: user_archive['topic_id']) + end category = topic_data.category sub_category = "-" if category