Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
05ad083a
Commit
05ad083a
authored
8 years ago
by
Qubad786
Browse files
Options
Downloads
Patches
Plain Diff
remove transaction.atomic decorator
parent
ab44b12a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
common/djangoapps/student/models.py
+1
-2
1 addition, 2 deletions
common/djangoapps/student/models.py
with
1 addition
and
2 deletions
common/djangoapps/student/models.py
+
1
−
2
View file @
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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment