fix(fake data generator): course tracking fix
This commit is contained in:
1 file changed
+1
-2
@@ -960,8 +960,7 @@ class Command(BaseCommand):
|
|||||||
else:
|
else:
|
||||||
period_end_date = joining_date + timedelta(days=365) # 1 year
|
period_end_date = joining_date + timedelta(days=365) # 1 year
|
||||||
|
|
||||||
# Create course tracking - save() will automatically update completion percentage
|
# Create course tracking without nested transaction
|
||||||
with transaction.atomic():
|
|
||||||
course_tracking = CourseTracking.objects.create(
|
course_tracking = CourseTracking.objects.create(
|
||||||
student=student,
|
student=student,
|
||||||
course=course,
|
course=course,
|
||||||
|
|||||||
Reference in new issue
Block a user