mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-23 01:57:00 +03:00
Some cleanup
This commit is contained in:
parent
f2625fc38c
commit
3f5e938247
|
@ -181,7 +181,7 @@ class WritableField(Field):
|
|||
|
||||
try:
|
||||
if self._use_files:
|
||||
files = files or {} # For the case when files==None
|
||||
files = files or {}
|
||||
native = files[field_name]
|
||||
else:
|
||||
native = data[field_name]
|
||||
|
|
|
@ -46,6 +46,6 @@ class FileSerializerTests(TestCase):
|
|||
"""
|
||||
now = datetime.datetime.now()
|
||||
|
||||
serializer = UploadedFileSerializer(data={'created': now}, files=None)
|
||||
serializer = UploadedFileSerializer(data={'created': now})
|
||||
self.assertFalse(serializer.is_valid())
|
||||
self.assertIn('file', serializer.errors)
|
||||
|
|
Loading…
Reference in New Issue
Block a user