We don't use this field in edx-platform since we rely on UserProfile
instead. But we need to do this to prevent accidental incorrect use of
this field. Django adds a migration between 1.11 and 2.2 to increase
the length of this field that we are opting to skip. This change
enforces the old limit.
We now either pass in the relevant courseoverview or when creating the
enrollement we use the factory which automatically creates the relevant
CourseOverview object for testing purposes.
Historically, the CourseEnrollment model used to have a `course_id`
field. A lot of tests still call the factory using that. Instead of a
`course_id` field this model now has a `course` field which is a foreign
key to the CourseOverview model.
The factory still accepts the course_id but uses it to create the
relevant CourseOverview object where necessary. This commit fixes two
issues with the factory.
1. If the course id is passed in as`course_id` instead of `course__id`
then, the generated CourseOverview does not have the correct course_id.
2. Even though the CourseEnrollment model no longer needs the
`course_id` parameter, we were still passing it through. We now remove
it so that it is not passed through to the CourseEnrollment model
instantiation.
It conflicts with an underlying related field on that model which seems
to be getting at the same value from the related table.
Add logging for incorrectly instantiating CourseEnrollment models.
This is to catch any places that might break this that are outside of
edx-platform. Django won't accept `course` values that aren't
course_overviews so we don't need extra logic to test that `course`
values are of the correct type.
fixup! Remove the course_id property on student.CourseEnrollment.
This adds contraints to:
kiwisolver: next release only works with python>=3.6
The was run to upgrade:
django-splash
django-wiki
edx-search
The previous versions were constraining django below 2.0.
Co-authored-by: Robert Raposa <rraposa@edx.org>
1. Created a new celery queue with key `SOFTWARE_SECURE_VERIFICATION_ROUTING_KEY`.
2. Added a celery task with retry logic.
3. sorted imports with isort.
4. Changed deprecated `log.warn` => `log.warning`.
We were passing unstripped password value to `authenticate_new_user()`
after creating a user which was resulting in password mismatch and
was raising this error.
PROD-656