Use proper HttpRequest object to call a Django view
parent
1c6a0938c4
commit
e3ad2a27c3
|
@ -343,4 +343,8 @@ class WebhookView(APIView):
|
|||
)
|
||||
view_cls = self.VIEW_MAP[integration.integration_type]
|
||||
view = view_cls.as_view(integration=integration)
|
||||
return view(request, project_slug)
|
||||
# DRF uses ``rest_framework.request.Request`` and Django expects
|
||||
# ``django.http.HttpRequest``
|
||||
# https://www.django-rest-framework.org/api-guide/requests/
|
||||
# https://github.com/encode/django-rest-framework/pull/5771#issuecomment-362815342
|
||||
return view(request._request, project_slug)
|
||||
|
|
Loading…
Reference in New Issue