Projet

Général

Profil

0001-form-correctly-ignore-empty-values-in-WidgetList-886.patch

Frédéric Péters, 04 novembre 2015 16:59

Télécharger (1,07 ko)

Voir les différences:

Subject: [PATCH] form: correctly ignore empty values in WidgetList (#8866)

(it used to ignore None but we also want it to ignore '')
 wcs/qommon/form.py | 9 +++++++++
 1 file changed, 9 insertions(+)
wcs/qommon/form.py
1179 1179
        r += self.render_hint(self.get_hint())
1180 1180
        return r.getvalue()
1181 1181

  
1182
    def _parse(self, request):
1183
        values = []
1184
        for name in self.element_names:
1185
            value = self.get(name)
1186
            if value:
1187
                values.append(value)
1188
        self.value = values or None
1189

  
1190

  
1182 1191
class WidgetDict(quixote.form.widget.WidgetDict):
1183 1192
    # Fix the title and hint setting
1184 1193
    # FIXME: to be fixed in Quixote upstream : title and hint parameters should be removed
1185
-