equal
deleted
inserted
replaced
801 """ |
801 """ |
802 |
802 |
803 def __init__(self, *args, **kwargs): |
803 def __init__(self, *args, **kwargs): |
804 super(PickManyField, self).__init__(*args, **kwargs) |
804 super(PickManyField, self).__init__(*args, **kwargs) |
805 |
805 |
|
806 def clean(self, value): |
|
807 """Validates that the input is a list or tuple. If no fields are marked, |
|
808 an empty string is returned istead of an empty list. |
|
809 """ |
|
810 |
|
811 value = super(PickManyField, self).clean(value) |
|
812 return value if value else '' |
|
813 |
806 |
814 |
807 class PickQuantField(forms.ChoiceField): |
815 class PickQuantField(forms.ChoiceField): |
808 """Stub for customizing the choice field. |
816 """Stub for customizing the choice field. |
809 """ |
817 """ |
810 |
818 |