email_opt_in_list fails when "name" is missing from auth_userprofile
Weekly research exports run the email_opt_in_list management command for each organization. This fails for three organizations: DartmouthX, LinuxFoundationX, and MITx.
An example stack trace is:
The Dartmouth command that fails was:
The value of "full_name" comes from:
profile.`name` AS `full_name`,
LEFT JOIN auth_userprofile AS profile ON profile.user_id=user.id
So presumably auth_userprofile.name is NULL or similar.
Steps to Reproduce
Reason for Variance
User Impact Summary
Good to know
This looks great! Thank you and . The partner will be very happy to get this data.
I ran this branch (aj/fix-email-opt-in-list) for DartmouthX and LinuxFoundationX, and both seemed to succeed. I wrote the output to the test/2016-06-07 subdirectory in course exports, if you want to check the resulting opt-in-email-list files.
Having a look.