Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added send email check when changing usernames #267

Merged
merged 1 commit into from
Nov 30, 2019
Merged

Added send email check when changing usernames #267

merged 1 commit into from
Nov 30, 2019

Conversation

sabaigbe
Copy link
Contributor

Fix for error produced when changing usernames with the USER_ENABLE_EMAIL flag set to False

[2019-07-11 10:34:59,531] ERROR in app: Exception on /user/change-username [POST]
Traceback (most recent call last):
  File "/home/ubuntu/github/my_app/venv/lib/python3.5/site-packages/flask/app.py", line 2311, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/ubuntu/github/my_app/venv/lib/python3.5/site-packages/flask/app.py", line 1834, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/ubuntu/github/my_app/venv/lib/python3.5/site-packages/flask/app.py", line 1737, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/ubuntu/github/my_app/venv/lib/python3.5/site-packages/flask/_compat.py", line 36, in reraise
    raise value
  File "/home/ubuntu/github/my_app/venv/lib/python3.5/site-packages/flask/app.py", line 1832, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/ubuntu/github/my_app/venv/lib/python3.5/site-packages/flask/app.py", line 1818, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/ubuntu/github/my_app/venv/lib/python3.5/site-packages/flask_user/user_manager.py", line 390, in change_username_stub
    return self.change_username_view()
  File "/home/ubuntu/github/my_app/venv/lib/python3.5/site-packages/flask_user/decorators.py", line 58, in decorator
    return view_function(*args, **kwargs)
  File "/home/ubuntu/github/my_app/venv/lib/python3.5/site-packages/flask_user/user_manager__views.py", line 141, in change_username_view
    self.email_manager.send_username_changed_email(current_user)
AttributeError: 'UserManager' object has no attribute 'email_manager'

@codecov-io
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (master@14d30bb). Click here to learn what that means.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #267   +/-   ##
=========================================
  Coverage          ?   88.55%           
=========================================
  Files             ?       25           
  Lines             ?     1451           
  Branches          ?        0           
=========================================
  Hits              ?     1285           
  Misses            ?      166           
  Partials          ?        0
Impacted Files Coverage Δ
flask_user/user_manager__views.py 95.73% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 14d30bb...4d01986. Read the comment docs.

Copy link
Collaborator

@and-semakin and-semakin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution @sabaigbe!

@and-semakin and-semakin merged commit 67f071b into lingthio:master Nov 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants