jazkarta / obsolete-edx-sga

OBSOLETE - moved to https://github.com/mitodl/edx-sga
1 stars 119 forks source link

Race condition while creating CCX can cause perma 500 #24

Closed carsongee closed 9 years ago

carsongee commented 9 years ago

Currently the creation of a CCX is not in a transaction, so race conditions are possible. This happened to me in the "wild" on edx.org, and I'm now no longer able to do anything with that course as I'm getting MultipleObjectsReturned: get() returned more than one CustomCourseForEdX -- it returned 2!. I believe the correction needs to be added around https://github.com/edx/edx-platform/blob/master/lms/djangoapps/ccx/views.py#L124-L129. I have the full stack trace if needed.