Skip to content

Commit

Permalink
chore: Fix RemovedInDjango40Warning for middleware get_response (#362)
Browse files Browse the repository at this point in the history
* chore: Fix RemovedInDjango40Warning for middleware get_response
---------

Co-authored-by: UsamaSadiq <usama7274@gmail.com>
  • Loading branch information
awais786 and UsamaSadiq authored Aug 22, 2023
1 parent e8c7e0c commit 64c91c0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ Change Log
Unreleased
----------

[8.9.1] - 2023-08-22
--------------------

Fixed
~~~~~
* Fixed Django 40 middleware deprecation warning

[8.9.0] - 2023-08-14
--------------------

Expand Down
2 changes: 1 addition & 1 deletion edx_rest_framework_extensions/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
""" edx Django REST Framework extensions. """

__version__ = '8.9.0' # pragma: no cover
__version__ = '8.9.1' # pragma: no cover
2 changes: 1 addition & 1 deletion edx_rest_framework_extensions/auth/jwt/authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def enforce_csrf(self, request):
Copied from SessionAuthentication.
See https://github.com/encode/django-rest-framework/blob/3f19e66d9f2569895af6e91455e5cf53b8ce5640/rest_framework/authentication.py#L131-L141 # noqa E501 line too long
"""
check = CSRFCheck() # pylint: disable=no-value-for-parameter
check = CSRFCheck(get_response=lambda request: None)
# populates request.META['CSRF_COOKIE'], which is used in process_view()
check.process_request(request)
reason = check.process_view(request, None, (), {})
Expand Down

0 comments on commit 64c91c0

Please sign in to comment.