summaryrefslogtreecommitdiff
path: root/django/core/files/uploadhandler.py
diff options
context:
space:
mode:
authorДилян Палаузов <Dilyan.Palauzov@db.com>2018-01-12 09:05:16 -0500
committerTim Graham <timograham@gmail.com>2018-01-12 12:44:50 -0500
commita38ae914d89809aed6d79337b74a8b31b6d3849a (patch)
tree42a8465e37fc02b70d8d3f876d23947acb1a2455 /django/core/files/uploadhandler.py
parent4bcec02368b7e5466f64dc17286689b16613c94b (diff)
downloaddjango-a38ae914d89809aed6d79337b74a8b31b6d3849a.tar.gz
Fixed #28996 -- Simplified some boolean constructs and removed trivial continue statements.
Diffstat (limited to 'django/core/files/uploadhandler.py')
-rw-r--r--django/core/files/uploadhandler.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/django/core/files/uploadhandler.py b/django/core/files/uploadhandler.py
index a0f34b741c..ddfb7e0116 100644
--- a/django/core/files/uploadhandler.py
+++ b/django/core/files/uploadhandler.py
@@ -160,10 +160,7 @@ class MemoryFileUploadHandler(FileUploadHandler):
"""
# Check the content-length header to see if we should
# If the post is too large, we cannot use the Memory handler.
- if content_length > settings.FILE_UPLOAD_MAX_MEMORY_SIZE:
- self.activated = False
- else:
- self.activated = True
+ self.activated = content_length <= settings.FILE_UPLOAD_MAX_MEMORY_SIZE
def new_file(self, *args, **kwargs):
super().new_file(*args, **kwargs)