Commit f79e9da0 by Jeff LaJoie Committed by GitHub

Merge pull request #15874 from edx/jlajoie/EDUCATOR-1135-add-null-check

EDUCATOR-1135: Adds in null check cohort management command
parents a23b7469 87db8fcf
......@@ -179,20 +179,20 @@ class Command(BaseCommand):
verified_course_user_group_partition_group.partition_id,
None
)
if (verified_partition_group_access
and verified_course_user_group_partition_group.group_id in verified_partition_group_access):
print "Queueing XBlock at location: '%s' for Verified Content Group update " % item.location
set_verified_enrollment_track = True
if verified_partition_group_access:
non_verified_track_access_groups = (set(verified_partition_group_access) -
all_cohorted_track_group_ids)
# If the item has group_access that is not the
# verified or audit group IDs then raise an error
# This only needs to be checked for this partition_group once
non_verified_track_access_groups = set(verified_partition_group_access) - all_cohorted_track_group_ids
if non_verified_track_access_groups:
errors.append(
"Non audit/verified cohorted content group set for xblock, location '%s' with IDs '%s'"
% (item.location, non_verified_track_access_groups)
)
if verified_course_user_group_partition_group.group_id in verified_partition_group_access:
print "Queueing XBlock at location: '%s' for Verified Content Group update " % item.location
set_verified_enrollment_track = True
# Add the enrollment track ids to a group access array
enrollment_track_group_access = []
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment