File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -556,7 +556,7 @@ def unassign_subject_from_all_roles(subject: SubjectData) -> bool:
556556 return enforcer .remove_filtered_grouping_policy (GroupingPolicyIndex .SUBJECT .value , subject .namespaced_key )
557557
558558
559- def get_all_role_assignments_per_scope_type (scope_types : list [type [ScopeData ]]) -> list [RoleAssignmentData ]:
559+ def get_all_role_assignments_per_scope_type (scope_types : tuple [type [ScopeData ], ... ]) -> list [RoleAssignmentData ]:
560560 """Get all role assignments matching any of the given scope types.
561561
562562 Loads all grouping policies from the enforcer and filters in Python. Casbin policies
@@ -572,5 +572,5 @@ def get_all_role_assignments_per_scope_type(scope_types: list[type[ScopeData]])
572572 """
573573 return [
574574 role_assignment for role_assignment in get_role_assignments ()
575- if isinstance (role_assignment .scope , tuple ( scope_types ) )
575+ if isinstance (role_assignment .scope , scope_types )
576576 ]
Original file line number Diff line number Diff line change @@ -322,7 +322,7 @@ def migrate_authz_to_legacy_course_roles(
322322 _validate_migration_input (course_id_list , org_id )
323323
324324 role_assignments = get_all_role_assignments_per_scope_type (
325- scope_types = [ CourseOverviewData , OrgCourseOverviewGlobData ]
325+ scope_types = ( CourseOverviewData , OrgCourseOverviewGlobData ,)
326326 )
327327
328328 # Two cases here:
You can’t perform that action at this time.
0 commit comments