Multiple choice nonrequired questions now accept empty answers.
The change is mostly concerned with issue 674, probably fixing it.
--- a/app/soc/views/helper/surveys.py Fri Oct 30 12:40:56 2009 +0100
+++ b/app/soc/views/helper/surveys.py Fri Oct 30 22:24:34 2009 +0100
@@ -803,6 +803,14 @@
def __init__(self, *args, **kwargs):
super(PickManyField, self).__init__(*args, **kwargs)
+ def clean(self, value):
+ """Validates that the input is a list or tuple. If no fields are marked,
+ an empty string is returned istead of an empty list.
+ """
+
+ value = super(PickManyField, self).clean(value)
+ return value if value else ''
+
class PickQuantField(forms.ChoiceField):
"""Stub for customizing the choice field.