Merge pull request #3486 from techAPJ/patch-2
FIX: handle user export failure when post is not linked to a topic
This commit is contained in:
commit
b2f50c154a
|
@ -130,11 +130,9 @@ module Jobs
|
||||||
user_archive_array = []
|
user_archive_array = []
|
||||||
topic_data = user_archive.topic
|
topic_data = user_archive.topic
|
||||||
user_archive = user_archive.as_json
|
user_archive = user_archive.as_json
|
||||||
if topic_data.nil?
|
topic_data = Topic.with_deleted.find_by(id: user_archive['topic_id']) if topic_data.nil?
|
||||||
# deleted topic
|
return user_archive_array if topic_data.nil?
|
||||||
topic_data = Topic.with_deleted.find_by(id: user_archive['topic_id'])
|
category = topic_data.category
|
||||||
end
|
|
||||||
category = topic_data.category if topic_data
|
|
||||||
sub_category = "-"
|
sub_category = "-"
|
||||||
if category
|
if category
|
||||||
category_name = category.name
|
category_name = category.name
|
||||||
|
|
Loading…
Reference in New Issue