mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-02-02 20:54:42 +03:00
FileField validation - handle case when files=None, fixes #542
This commit is contained in:
parent
1c8fccfdcd
commit
f2625fc38c
|
@ -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]
|
||||
|
|
Loading…
Reference in New Issue
Block a user