Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions openedx/features/enterprise_support/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ def consent_needed_for_course(request, user, course_id, enrollment_exists=False)
client = ConsentApiClient(user=request.user)
current_enterprise_uuid = enterprise_customer_uuid_for_request(request)
consent_needed = any(
current_enterprise_uuid == learner['enterprise_customer']['uuid']
str(current_enterprise_uuid) == str(learner['enterprise_customer']['uuid'])
and Site.objects.get(domain=learner['enterprise_customer']['site']['domain']) == request.site
and client.consent_required(
username=user.username,
Expand All @@ -587,7 +587,7 @@ def consent_needed_for_course(request, user, course_id, enrollment_exists=False)

if not consent_needed:
for learner in enterprise_learner_details:
if current_enterprise_uuid != learner['enterprise_customer']['uuid']:
if str(current_enterprise_uuid) != str(learner['enterprise_customer']['uuid']):
LOGGER.info(
'[ENTERPRISE DSC] Consent requirement failed due to enterprise mismatch. '
'USER: [%s], CurrentEnterprise: [%s], LearnerEnterprise: [%s]',
Expand Down