Skip to content

Commit 95bc76a

Browse files
shubham-padiaSaptakS
authored andcommitted
Fix: forgot password not working (#2973)
1 parent ef4a01c commit 95bc76a

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

app/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ def as_timezone(dt, tzname):
415415
"""Accepts a Time aware Datetime object and a Timezone name.
416416
Returns Converted Timezone aware Datetime Object.
417417
"""
418-
if tzname:
418+
if timezone(tzname):
419419
return dt.astimezone(timezone(tzname))
420420
return dt
421421

app/views/home.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@ def password_reset_view():
177177
user = DataGetter.get_user_by_email(email)
178178
if user:
179179
link = request.host + url_for(".change_password_view", hash=user.reset_password)
180-
return link
181180
send_email_with_reset_password_hash(email, link)
182181
flash('Please go to the link sent to your email to reset your password')
183182
return redirect(url_for('.login_view'))

0 commit comments

Comments
 (0)