Projet

Général

Profil

0001-misc-handle-None-when-unserializing-file-field-from-.patch

Frédéric Péters, 02 mai 2016 09:25

Télécharger (882 octets)

Voir les différences:

Subject: [PATCH] misc: handle None when unserializing file field from json
 (#10786)

 wcs/fields.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
wcs/fields.py
789 789
        }
790 790

  
791 791
    def from_json_value(self, value):
792
        if 'filename' in value and 'content' in value:
792
        if value and 'filename' in value and 'content' in value:
793 793
            content = base64.b64decode(value['content'])
794 794
            content_type = value.get('content_type', 'application/octet-stream')
795 795
            if content_type.startswith('text/'):
796
-