Fix "delete help links" data fixup to allow for consortiums

Fixes FOO-4808
Refs FOO-4794
flag=none

It was discovered after merge that the "delete help links"
data fixup migration was missing a test... if the account
is part of a consortium, the help links are "root_only"
settings and some plugins validate the assignment to
root_only settings and disallow their assignment if the
account is a consortium member.

Test plan:
* If you have consortium accounts, the original migration
  should no longer fail

Change-Id: Ife8369263be71aeca10f8c78ecfb9f046545b15a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/358369
Reviewed-by: August Thornton <august@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
This commit is contained in:
Charley Kline 2024-09-24 17:57:28 -05:00
parent 88c71e735d
commit 49200d8575
1 changed files with 2 additions and 0 deletions

View File

@ -23,6 +23,8 @@ module DataFixup
help_link_id = help_link_id.to_sym
Account.root_accounts.active.non_shadow.find_each do |account|
next unless account.primary_settings_root_account?
links = account.settings[:custom_help_links]
next unless links