diff options
| author | Carlton Gibson <carlton.gibson@noumenal.es> | 2019-05-07 12:38:11 +0200 |
|---|---|---|
| committer | Carlton Gibson <carlton.gibson@noumenal.es> | 2019-05-08 09:26:13 +0200 |
| commit | 6a92bcf55bb671c64562be05024a824674b4ceab (patch) | |
| tree | 5195f7fda69558f0d691b847280b4df231557e74 | |
| parent | b915b9f10f1110bf6b8468060ce9753ff78ffb07 (diff) | |
Removed redundant check from StaticFilesHandler.
| -rw-r--r-- | django/contrib/staticfiles/handlers.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/django/contrib/staticfiles/handlers.py b/django/contrib/staticfiles/handlers.py index 95466355a4..8618f0e28e 100644 --- a/django/contrib/staticfiles/handlers.py +++ b/django/contrib/staticfiles/handlers.py @@ -53,12 +53,10 @@ class StaticFilesHandler(WSGIHandler): def get_response(self, request): from django.http import Http404 - if self._should_handle(request.path): - try: - return self.serve(request) - except Http404 as e: - return response_for_exception(request, e) - return super().get_response(request) + try: + return self.serve(request) + except Http404 as e: + return response_for_exception(request, e) def __call__(self, environ, start_response): if not self._should_handle(get_path_info(environ)): |
