Skip to content

Commit ab1329f

Browse files
author
Tycho Hob
committed
style: Use a generator for checking valid course key input
1 parent b245375 commit ab1329f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

openedx_authz/engine/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ def _validate_migration_input(course_id_list, org_id):
178178
"At least one of course_id_list or org_id must be provided to limit the scope of the migration."
179179
)
180180

181-
if course_id_list and any([course_key for course_key in course_id_list if not course_key.startswith("course-v1:")]):
181+
if course_id_list and any(not course_key.startswith("course-v1:") for course_key in course_id_list):
182182
raise ValueError(
183183
"Only full course keys (e.g., 'course-v1:org+course+run') are supported in the course_id_list."
184184
" Other course types such as CCX are not supported."

0 commit comments

Comments
 (0)