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
a904324f
Commit
a904324f
authored
Sep 15, 2017
by
Tasawer Nawaz
Committed by
GitHub
Sep 15, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #16021 from edx/tasawer/learner-388-fix-attribute-error-in-password-reseting
Fix attribute error while reseting password
parents
3b680cb8
6263a574
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
common/djangoapps/student/views.py
+10
-3
No files found.
common/djangoapps/student/views.py
View file @
a904324f
...
...
@@ -2629,9 +2629,16 @@ def password_reset_confirm_wrapper(request, uidb36=None, token=None):
# If password reset was unsuccessful a template response is returned (status_code 200).
# Check if form is invalid then show an error to the user.
# Note if password reset was successful we get response redirect (status_code 302).
if
response
.
status_code
==
200
and
not
response
.
context_data
[
'form'
]
.
is_valid
():
response
.
context_data
[
'err_msg'
]
=
_
(
'Error in resetting your password. Please try again.'
)
return
response
if
response
.
status_code
==
200
:
form_valid
=
response
.
context_data
[
'form'
]
.
is_valid
()
if
response
.
context_data
[
'form'
]
else
False
if
not
form_valid
:
log
.
warning
(
u'Unable to reset password for user [
%
s] because form is not valid. '
u'A possible cause is that the user had an invalid reset token'
,
user
.
username
,
)
response
.
context_data
[
'err_msg'
]
=
_
(
'Error in resetting your password. Please try again.'
)
return
response
# get the updated user
updated_user
=
User
.
objects
.
get
(
id
=
uid_int
)
...
...
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