Revert "Initialize enterprise api client with provided user"
This commit is contained in:
@@ -30,8 +30,8 @@ from openedx.core.lib.api.permissions import ApiKeyHeaderPermission, ApiKeyHeade
|
||||
from openedx.core.lib.exceptions import CourseNotFoundError
|
||||
from openedx.core.lib.log_utils import audit_log
|
||||
from openedx.features.enterprise_support.api import (
|
||||
ConsentApiServiceClient,
|
||||
EnterpriseApiServiceClient,
|
||||
ConsentApiClient,
|
||||
EnterpriseApiClient,
|
||||
EnterpriseApiException,
|
||||
enterprise_enabled
|
||||
)
|
||||
@@ -598,8 +598,8 @@ class EnrollmentListView(APIView, ApiKeyPermissionMixIn):
|
||||
enterprise_course_consent = request.data.get('enterprise_course_consent')
|
||||
explicit_linked_enterprise = request.data.get('linked_enterprise_customer')
|
||||
if (enterprise_course_consent or explicit_linked_enterprise) and has_api_key_permissions and enterprise_enabled():
|
||||
enterprise_api_client = EnterpriseApiServiceClient()
|
||||
consent_client = ConsentApiServiceClient()
|
||||
enterprise_api_client = EnterpriseApiClient()
|
||||
consent_client = ConsentApiClient()
|
||||
# We received an explicitly-linked EnterpriseCustomer for the enrollment
|
||||
if explicit_linked_enterprise is not None:
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user