Skip to content

Commit

Permalink
Merge pull request #3058 from SEED-platform/Replace-deprecated-functi…
Browse files Browse the repository at this point in the history
…on-request.is_ajax

Replace deprecated function request.is ajax
  • Loading branch information
macintoshpie committed Jan 3, 2022
2 parents 77fda54 + 7708cf2 commit ec6802a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion seed/utils/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def get_api_request_user(request):
"""
Determines if this is an API request and returns the corresponding user if so.
"""
if request.is_ajax():
if request.headers.get('x-requested-with') == 'XMLHttpRequest':
return False

return User.process_header_request(request)
Expand Down

0 comments on commit ec6802a

Please sign in to comment.