Returning None instead of the empty to fix a bug on melange-demo instance.
Patch by: Lennard de Rijk
Reviewed by: to-be-reviewed
--- a/app/soc/logic/cleaning.py Thu Feb 12 22:52:16 2009 +0000
+++ b/app/soc/logic/cleaning.py Thu Feb 12 23:06:14 2009 +0000
@@ -56,7 +56,7 @@
if not field_content:
# field has no content so bail out
- return field_content
+ return None
else:
# field has contents
return fun(self)
@@ -236,10 +236,6 @@
value = self.cleaned_data.get(field_name)
- # LinkProperty does not accept the empty string so we must return None
- if not value or value == u'':
- return None
-
# call the Django URLField cleaning method to properly clean/validate this field
return forms.URLField.clean(self.fields[field_name], value)
return wrapped