Skip to content

Commit

Permalink
fix: fix revocation utility comparison (#32751)
Browse files Browse the repository at this point in the history
* fix: fix revocation utility comparison
  • Loading branch information
aht007 authored Jul 14, 2023
1 parent 3476647 commit 1af9803
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1299,7 +1299,7 @@ def test_already_completed_course(self, mock_get_courses_completion_status):
is_active=True,
mode=CourseMode.VERIFIED
)
mock_get_courses_completion_status.return_value = ([enrollment.course_id], False)
mock_get_courses_completion_status.return_value = ([str(enrollment.course_id)], False)
course_entitlement = CourseEntitlementFactory.create(user=self.user, enrollment_course_run=enrollment)
url = reverse(self.REVOKE_VERIFIED_ACCESS_PATH)

Expand Down
2 changes: 1 addition & 1 deletion common/djangoapps/entitlements/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def revoke_entitlements_and_downgrade_courses_to_audit(course_entitlements, user
if course_entitlement.enrollment_course_run is None:
if course_entitlement.expired_at is None:
course_entitlement.expire_entitlement()
elif course_entitlement.enrollment_course_run.course_id not in awarded_cert_course_ids:
elif str(course_entitlement.enrollment_course_run.course_id) not in awarded_cert_course_ids:
course_id = course_entitlement.enrollment_course_run.course_id
enrollment_mode = course_entitlement.enrollment_course_run.mode
username = course_entitlement.enrollment_course_run.user.username
Expand Down

0 comments on commit 1af9803

Please sign in to comment.