Commit 527774ef by David Ormsbee Committed by GitHub

Merge pull request #14545 from edx/ormsbee/enrollment_select_related_user

Select related users when returning enrollments.
parents 955dc69e 351c3481
......@@ -1439,7 +1439,7 @@ class CourseEnrollment(models.Model):
@classmethod
def enrollments_for_user(cls, user):
return cls.objects.filter(user=user, is_active=1)
return cls.objects.filter(user=user, is_active=1).select_related('user')
@classmethod
def enrollment_status_hash_cache_key(cls, user):
......
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