Projet

Général

Profil

0001-formdata-return-empty-string-as-view-value-for-None-.patch

Frédéric Péters, 28 avril 2017 11:02

Télécharger (960 octets)

Voir les différences:

Subject: [PATCH] formdata: return empty string as view value for None fields
 (#16073)

 wcs/formdata.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
wcs/formdata.py
507 507
        if field.type == 'anonymised':
508 508
            return _('Yes') if self.anonymised else _('No')
509 509

  
510
        field_value = self.data.get(field.id, '')
510
        field_value = self.data.get(field.id)
511
        if field_value is None:
512
            return ''
511 513
        if max_length:
512 514
            # if max_length is set the target is a backoffice listing/table,
513 515
            # return an html value, appropriately shortened.
514
-