Skip to content
Snippets Groups Projects
Commit 23d87a7a authored by akamil's avatar akamil
Browse files

Handle corner case where a student does not have a login_id.

parent 149b0404
No related branches found
No related tags found
No related merge requests found
......@@ -21,7 +21,8 @@ except:
def main(course_id, output=None):
api_token = common.get_api_token()
roster = get_roster(api_token, course_id)
roster.sort(key=lambda item: item['login_id'])
roster = filter(lambda item: 'login_id' in item, roster)
roster = sorted(roster, key=lambda item: item['login_id'])
write_roster(roster, output)
def get_user(api_token, course_id, user_id):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment