Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
a0f99e6d
Commit
a0f99e6d
authored
Nov 29, 2016
by
M. Rehan
Committed by
GitHub
Nov 29, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #14050 from edx/mrehan/ecom-6154-integrity-error
ECOM-6154 – remove transaction.atomic decorator
parents
af504fc6
05ad083a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
2 deletions
+1
-2
common/djangoapps/student/models.py
+1
-2
No files found.
common/djangoapps/student/models.py
View file @
a0f99e6d
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment