diff options
| author | Yuri Prezument | 2013-01-02 22:12:26 +0200 |
|---|---|---|
| committer | Yuri Prezument | 2013-01-02 22:12:26 +0200 |
| commit | f2625fc38cdafd795981bd72134b84d6a2c79841 (patch) | |
| tree | b03804a58b2493caa4cb6781b53167173d6e2afa /rest_framework | |
| parent | 1c8fccfdcd6186023a6ca6c8d50759172081d05a (diff) | |
| download | django-rest-framework-f2625fc38cdafd795981bd72134b84d6a2c79841.tar.bz2 | |
FileField validation - handle case when files=None, fixes #542
Diffstat (limited to 'rest_framework')
| -rw-r--r-- | rest_framework/fields.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/rest_framework/fields.py b/rest_framework/fields.py index d8b82e5f..a4cc7f3b 100644 --- a/rest_framework/fields.py +++ b/rest_framework/fields.py @@ -181,6 +181,7 @@ class WritableField(Field): try: if self._use_files: + files = files or {} # For the case when files==None native = files[field_name] else: native = data[field_name] |
