Commit a0f99e6d by M. Rehan Committed by GitHub

Merge pull request #14050 from edx/mrehan/ecom-6154-integrity-error

ECOM-6154 – remove transaction.atomic decorator
parents af504fc6 05ad083a
......@@ -29,7 +29,7 @@ from django.contrib.auth.models import User
from django.contrib.auth.signals import user_logged_in, user_logged_out
from django.core.cache import cache
from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned
from django.db import models, IntegrityError, transaction
from django.db import models, IntegrityError
from django.db.models import Count
from django.db.models.signals import pre_save, post_save
from django.dispatch import receiver, Signal
......@@ -1024,7 +1024,6 @@ class CourseEnrollment(models.Model):
cache.delete(self.enrollment_status_hash_cache_key(self.user))
@classmethod
@transaction.atomic
def get_or_create_enrollment(cls, user, course_key):
"""
Create an enrollment for a user in a class. By default *this enrollment
......
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