Fix 500 when saving /site/edit without email
authorSverre Rabbelier <srabbelier@gmail.com>
Sat, 12 Sep 2009 00:36:49 +0200
changeset 2898 ac5f77cd6046
parent 2897 c0e78185444c
child 2899 691735924efb
Fix 500 when saving /site/edit without email When saving /site/edit with no no_reply_email set, a 500 error page would be returned due to an empty value being passed as value to the datastore (which is not allowed for email fields).
app/soc/views/models/site.py
--- a/app/soc/views/models/site.py	Sat Sep 12 01:22:03 2009 +0200
+++ b/app/soc/views/models/site.py	Sat Sep 12 00:36:49 2009 +0200
@@ -90,6 +90,7 @@
             filter_fields={'prefix': new_params['document_prefix']},
             label=ugettext('Terms of Service Document link ID'),
             help_text=soc.models.work.Work.link_id.help_text),
+        'clean_noreply_email': cleaning.clean_empty_field('noreply_email'),
         }
 
     patterns = []