Commit 97d3d68b by David Ormsbee

When replicating CourseEnrollment, make sure Users were created in all DBs…

When replicating CourseEnrollment, make sure Users were created in all DBs before replicating other models
parent 0214afa7
...@@ -279,7 +279,8 @@ def replicate_enrollment_save(sender, **kwargs): ...@@ -279,7 +279,8 @@ def replicate_enrollment_save(sender, **kwargs):
enrollment_obj = kwargs['instance'] enrollment_obj = kwargs['instance']
log.debug("Replicating user because of new enrollment") log.debug("Replicating user because of new enrollment")
replicate_user(enrollment_obj.user, enrollment_obj.course_id) for course_db_name in db_names_to_replicate_to(enrollment_obj.user.id):
replicate_user(enrollment_obj.user, course_db_name)
log.debug("Replicating enrollment because of new enrollment") log.debug("Replicating enrollment because of new enrollment")
replicate_model(CourseEnrollment.save, enrollment_obj, enrollment_obj.user_id) replicate_model(CourseEnrollment.save, enrollment_obj, enrollment_obj.user_id)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment