# HG changeset patch # User Lennard de Rijk # Date 1234479974 0 # Node ID 4ef7de6c2b7a2df87290ad9f8c41378d76871ed3 # Parent 9b18d612510a436b04419af2ef42e37b203711e3 Returning None instead of the empty to fix a bug on melange-demo instance. Patch by: Lennard de Rijk Reviewed by: to-be-reviewed diff -r 9b18d612510a -r 4ef7de6c2b7a app/soc/logic/cleaning.py --- 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