mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-28 16:28:01 -05:00
Fix unexpected NO_EMAILS error when users remove their email.
This commit is contained in:
@@ -896,7 +896,8 @@ class ApiController(RedditController, OAuth2ResourceController):
|
||||
|
||||
# user is removing their email
|
||||
if (not email and c.user.email and
|
||||
form.has_errors("email", errors.NO_EMAILS)):
|
||||
(errors.NO_EMAILS, 'email') in c.errors):
|
||||
c.errors.remove((errors.NO_EMAILS, 'email'))
|
||||
c.user.email = ''
|
||||
c.user.email_verified = None
|
||||
c.user._commit()
|
||||
|
||||
Reference in New Issue
Block a user