Properly handle duplicate emails when uploading student CSV
When there is a duplicate email the error thrown (in the SQLAlchemy branch) is:
Uploaded CSV is not in the correct format: did you export it from Brightspace? The error was: <class 'sqlalchemy.exc.IntegrityError'>: (raised as a result of Query-invoked autoflush; consider using a session.no_autoflush block if this flush is occurring prematurely) (sqlite3.IntegrityError) UNIQUE constraint failed: student.email [SQL: INSERT INTO student (id, first_name, last_name, email) VALUES (?, ?, ?, ?)] [parameters: (8304256, 'Dawn', 'Griffin', 'd.e.griffin@sharklasers.com')] (Background on this error at: http://sqlalche.me/e/gkpj)
The processing of the rest of the students also stops. We should continue processing the students and warn the user with a nice error message.
Related: #284 (closed)