diff options
| author | Дилян Палаузов <Dilyan.Palauzov@db.com> | 2018-01-03 18:52:12 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2018-01-03 20:12:23 -0500 |
| commit | d7b2aa24f75434c2ce50100cfef3586071e0747a (patch) | |
| tree | 9074eb7522888e744f948c52174f367a4281c200 /django/test/client.py | |
| parent | c2d0f8c084456b5073252a91eeb09ab3d7453b18 (diff) | |
Fixed #28982 -- Simplified code with and/or.
Diffstat (limited to 'django/test/client.py')
| -rw-r--r-- | django/test/client.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/django/test/client.py b/django/test/client.py index 3a163d126f..d69c33f1bd 100644 --- a/django/test/client.py +++ b/django/test/client.py @@ -236,8 +236,7 @@ def encode_file(boundary, key, file): if content_type is None: content_type = 'application/octet-stream' - if not filename: - filename = key + filename = filename or key return [ to_bytes('--%s' % boundary), to_bytes('Content-Disposition: form-data; name="%s"; filename="%s"' |
