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.
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.