diff --git a/app/controllers/plans_controller.rb b/app/controllers/plans_controller.rb index 421514001a..277ce4a699 100644 --- a/app/controllers/plans_controller.rb +++ b/app/controllers/plans_controller.rb @@ -192,10 +192,8 @@ def show end @default_orgs = Org.default_orgs @all_ggs_grouped_by_org.each do |org, ggs| - @important_ggs << [org, ggs] if @default_orgs.include?(org) - - # If this is one of the already selected guidance groups its important! - @important_ggs << [org, ggs] if !(ggs & @selected_guidance_groups).empty? && !@important_ggs.include?([org, ggs]) + # @default_orgs and already selected guidance groups are important. + @important_ggs << [org, ggs] if (@default_orgs.include?(org) || !(ggs & @selected_guidance_groups).empty?) && !@important_ggs.include?([org, ggs]) end # Sort the rest by org name for the accordion