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
dd8aba8f
Commit
dd8aba8f
authored
Mar 21, 2015
by
Nimisha Asthagiri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes merge conflict with account creation transaction.
parent
c35cd5d8
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 @
dd8aba8f
...
@@ -1392,8 +1392,6 @@ def _do_create_account(form):
...
@@ -1392,8 +1392,6 @@ def _do_create_account(form):
log
.
exception
(
"UserProfile creation failed for user {id}."
.
format
(
id
=
user
.
id
))
log
.
exception
(
"UserProfile creation failed for user {id}."
.
format
(
id
=
user
.
id
))
raise
raise
preferences_api
.
set_user_preference
(
user
,
LANGUAGE_KEY
,
get_language
())
return
(
user
,
profile
,
registration
)
return
(
user
,
profile
,
registration
)
...
@@ -1472,6 +1470,7 @@ def create_account_with_params(request, params):
...
@@ -1472,6 +1470,7 @@ def create_account_with_params(request, params):
tos_required
=
tos_required
,
tos_required
=
tos_required
,
)
)
# Perform operations within a transaction that are critical to account creation
with
transaction
.
commit_on_success
():
with
transaction
.
commit_on_success
():
# first, create the account
# first, create the account
(
user
,
profile
,
registration
)
=
_do_create_account
(
form
)
(
user
,
profile
,
registration
)
=
_do_create_account
(
form
)
...
@@ -1502,6 +1501,9 @@ def create_account_with_params(request, params):
...
@@ -1502,6 +1501,9 @@ def create_account_with_params(request, params):
request
.
social_strategy
.
clean_partial_pipeline
()
request
.
social_strategy
.
clean_partial_pipeline
()
raise
ValidationError
({
'access_token'
:
[
error_message
]})
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'
):
if
settings
.
FEATURES
.
get
(
'ENABLE_DISCUSSION_EMAIL_DIGEST'
):
try
:
try
:
enable_notifications
(
user
)
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