From a0323623f8f6c3026de21b851bbc56c9cdce79b9 Mon Sep 17 00:00:00 2001 From: moeez96 Date: Wed, 24 May 2023 13:44:32 +0500 Subject: [PATCH] fix: Enable TrackingMiddleware for Mobile IAP basket api call --- ecommerce/extensions/iap/api/v1/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ecommerce/extensions/iap/api/v1/views.py b/ecommerce/extensions/iap/api/v1/views.py index fb7e5261fca..8ab198da79e 100644 --- a/ecommerce/extensions/iap/api/v1/views.py +++ b/ecommerce/extensions/iap/api/v1/views.py @@ -11,6 +11,7 @@ from django.utils.html import escape from django.utils.translation import ugettext as _ from edx_django_utils import monitoring as monitoring_utils +from edx_rest_framework_extensions.permissions import LoginRedirectIfUnauthenticated from googleapiclient.discovery import build from oauth2client.service_account import ServiceAccountCredentials from oscar.apps.basket.views import * # pylint: disable=wildcard-import, unused-wildcard-import @@ -87,7 +88,7 @@ class MobileBasketAddItemsView(BasketLogicMixin, APIView): """ View that adds single or multiple products to a mobile user's basket. """ - permission_classes = (IsAuthenticated,) + permission_classes = (LoginRedirectIfUnauthenticated,) def get(self, request): # Send time when this view is called - https://openedx.atlassian.net/browse/REV-984