From fe1ad3640ff66a67ec4003c6c73157af464d705a Mon Sep 17 00:00:00 2001 From: briri Date: Tue, 21 Sep 2021 09:15:09 -0700 Subject: [PATCH] update plans controller to auto-select the default org's guidance for the edit plan page --- app/controllers/plans_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/plans_controller.rb b/app/controllers/plans_controller.rb index 6cc21c7a0f..437a5093ae 100644 --- a/app/controllers/plans_controller.rb +++ b/app/controllers/plans_controller.rb @@ -192,7 +192,7 @@ def show @important_ggs << [current_user.org, @all_ggs_grouped_by_org[current_user.org]] end @all_ggs_grouped_by_org.each do |org, ggs| - @important_ggs << [org, ggs] if org.organisation? + @important_ggs << [org, ggs] if Org.default_orgs.include?(org) # If this is one of the already selected guidance groups its important! unless (ggs & @selected_guidance_groups).empty?