Skip to content

Commit

Permalink
fix group and categories page if parent not found
Browse files Browse the repository at this point in the history
  • Loading branch information
syphax-bouazzouni committed Nov 17, 2024
1 parent 2dc88d3 commit ff27c12
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/controllers/taxonomy_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def nest_categories_children(categories)
categories.each do |category|
category[:parentCategory].each do |parent_id|
parent = category_index[parent_id]
next unless parent
parent[:children] ||= []
parent[:children] << category
end
Expand Down

1 comment on commit ff27c12

@Bilelkihal
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@syphax-bouazzouni It's not logically possible to have a category listed in another category as a parent, but not present in the global categories list.
The issue with EcoPortal's api is that the parentCategory is nil, I tried to use their API and I did this PR:
ontoportal-lirmm#858

Please sign in to comment.