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
ec6cc04b
Commit
ec6cc04b
authored
Mar 21, 2015
by
Nimisha Asthagiri
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7440 from edx/nimisha/fix-account-creation-merge-issue
Fixes merge conflict with account creation transaction.
parents
c35cd5d8
dd8aba8f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
common/djangoapps/student/views.py
+4
-2
No files found.
common/djangoapps/student/views.py
View file @
ec6cc04b
...
...
@@ -1392,8 +1392,6 @@ def _do_create_account(form):
log
.
exception
(
"UserProfile creation failed for user {id}."
.
format
(
id
=
user
.
id
))
raise
preferences_api
.
set_user_preference
(
user
,
LANGUAGE_KEY
,
get_language
())
return
(
user
,
profile
,
registration
)
...
...
@@ -1472,6 +1470,7 @@ def create_account_with_params(request, params):
tos_required
=
tos_required
,
)
# Perform operations within a transaction that are critical to account creation
with
transaction
.
commit_on_success
():
# first, create the account
(
user
,
profile
,
registration
)
=
_do_create_account
(
form
)
...
...
@@ -1502,6 +1501,9 @@ def create_account_with_params(request, params):
request
.
social_strategy
.
clean_partial_pipeline
()
raise
ValidationError
({
'access_token'
:
[
error_message
]})
# Perform operations that are non-critical parts of account creation
preferences_api
.
set_user_preference
(
user
,
LANGUAGE_KEY
,
get_language
())
if
settings
.
FEATURES
.
get
(
'ENABLE_DISCUSSION_EMAIL_DIGEST'
):
try
:
enable_notifications
(
user
)
...
...
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