Skip to content
This repository was archived by the owner on May 26, 2020. It is now read-only.

Commit 1a7a8cf

Browse files
committed
Another fix for compatibility issues with DRF 3.2
The reason for this fix is explained there: #146 (comment)
1 parent 7dc2ce7 commit 1a7a8cf

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

rest_framework_jwt/compat.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,9 @@ def get_username(user):
5050

5151

5252
def get_request_data(request):
53-
try:
53+
if hasattr(request, 'data'):
5454
data = request.data
55-
except:
55+
else:
5656
# DRF < 3.2
5757
data = request.DATA
58-
5958
return data

0 commit comments

Comments
 (0)