Commit 5a62c83d by Don Mitchell

Handle some records not having lower_id

parent 30f2c933
......@@ -75,7 +75,10 @@ class Migration(DataMigration):
hold.setdefault(course_id_string, []).append(group)
else:
correct_course_key = SlashSeparatedCourseKey(*entry['_id'].values())
_migrate_users(correct_course_key, role, entry['lower_id']['org'])
if 'lower_id' in entry:
_migrate_users(correct_course_key, role, entry['lower_id']['org'])
else:
_migrate_users(correct_course_key, role, entry['_id']['org'].lower())
# see if any in hold were missed above
for held_auth_scope, groups in hold.iteritems():
......
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