|
|
|
@ -19,6 +19,7 @@ json.data do
|
|
|
|
|
json.category_id attachment.course_second_category_id
|
|
|
|
|
if (@course_second_category_id.to_i == 0 && attachment.course_second_category.present?) || (@parent_category_id == 0 && attachment.course_second_category&.parent_id.to_i != 0)
|
|
|
|
|
json.category_name attachment.course_second_category&.name
|
|
|
|
|
json.parent_category_name attachment.course_second_category&.parent&.name
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|