diff rhodecode/lib/celerylib/tasks.py @ 722:02bdf2f296ff beta

fixes #69 password confirmation for register dialog. Fixes appcrash when using some special characters in register field fixes app crash when no email config is enabled
author Marcin Kuzminski <marcin@python-works.com>
date Thu, 18 Nov 2010 23:07:04 +0100
parents 52da7cba88a6
children 89b9037d68b7
line wrap: on
line diff
--- a/rhodecode/lib/celerylib/tasks.py	Thu Nov 18 21:04:40 2010 +0100
+++ b/rhodecode/lib/celerylib/tasks.py	Thu Nov 18 23:07:04 2010 +0100
@@ -255,7 +255,7 @@
         recipients = [email_config.get('email_to')]
 
     def str2bool(v):
-        return v.lower() in ["yes", "true", "t", "1"]
+        return v.lower() in ["yes", "true", "t", "1"] if v else None
 
     mail_from = email_config.get('app_email_from')
     user = email_config.get('smtp_username')