Skip to content

Commit

Permalink
Adding a return for one of the error cases on change password
Browse files Browse the repository at this point in the history
  • Loading branch information
DFectuoso committed Apr 21, 2011
1 parent 66d9332 commit 9cb1a6c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/local/bin/python
# -*- coding: utf-8 -*-
#Copyright (c) 2011 - Santiago Zavala
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -140,7 +142,7 @@ def post(self):

mail.send_mail(sender="NoticiasHacker <dfectuoso@noticiashacker.com>",
to=user.nickname + "<"+user.email+">",
subject="Codigo para restablecer contraseña",
subject="Liga para restablecer password",
html=template.render('templates/mail/forgotten-password-email.html', locals()),
body=template.render('templates/mail/forgotten-password-email-plain.html', locals()))

Expand Down Expand Up @@ -174,6 +176,7 @@ def post(self,code):
if password != password_confirm :
session['error'] = "Ocurrió un error al confirmar el password"
self.redirect('/recovery/'+code)
return
ticket = Ticket.all().filter('code',code).filter('is_active',True).fetch(1)
if len(ticket) == 1:
ticket = ticket[0]
Expand Down

0 comments on commit 9cb1a6c

Please sign in to comment.