From a38ae914d89809aed6d79337b74a8b31b6d3849a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B8=D0=BB=D1=8F=D0=BD=20=D0=9F=D0=B0=D0=BB=D0=B0?= =?UTF-8?q?=D1=83=D0=B7=D0=BE=D0=B2?= Date: Fri, 12 Jan 2018 09:05:16 -0500 Subject: Fixed #28996 -- Simplified some boolean constructs and removed trivial continue statements. --- django/core/files/uploadhandler.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'django/core/files/uploadhandler.py') 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) -- cgit v1.2.1