Commit 9add24e4 by PaulWattenberger

Handle vars: None in Sailthru user record in unenroll list update

parent 38fe6e6d
......@@ -315,7 +315,8 @@ def _update_unenrolled_list(sailthru_client, email, course_url, unenroll):
response_json = sailthru_response.json
unenroll_list = []
if response_json and "vars" in response_json and "unenrolled" in response_json["vars"]:
if response_json and "vars" in response_json and response_json["vars"] \
and "unenrolled" in response_json["vars"]:
unenroll_list = response_json["vars"]["unenrolled"]
changed = False
......
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