File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -322,9 +322,8 @@ def migrate_authz_to_legacy_course_roles(
322322 role_assignments = get_all_role_assignments_per_scope_type (scope_type = CourseOverviewData )
323323
324324 # Two cases here:
325- # 1. If org_id is provided, we filter by org_id which will include both org-level glob scopes and course-level scopes linked to that org
326- # 2. If only course_id_list is provided, we filter by course_id which will include only course-level scopes linked to those course_ids since
327- # org-level glob scopes don't have course_id in their scope object
325+ # 1. org_id provided: filter by org — includes org-level glob and course-level scopes for that org.
326+ # 2. only course_id_list provided: filter by course_id — org-level glob scopes are excluded (no course_id).
328327 if org_id :
329328 role_assignments = [
330329 role_assignment
@@ -383,7 +382,7 @@ def migrate_authz_to_legacy_course_roles(
383382 if delete_after_migration :
384383 unassignments [(role_external_key , scope_external_key )].append (user_external_key )
385384
386- except Exception as e :
385+ except Exception as e : # pylint: disable=broad-exception-caught
387386 logger .error (
388387 f"Error rolling back RoleAssignment for User: { role_assignment .subject .external_key } "
389388 f"in Role: { role_assignment .roles [0 ].external_key } and Scope: { role_assignment .scope .external_key } : { e } "
You can’t perform that action at this time.
0 commit comments