Skip to content

Commit 31ca3d4

Browse files
authored
fix: removing linked_enterprise param from filter
1 parent 05a1eba commit 31ca3d4

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

  • openedx/core/djangoapps/enrollments

openedx/core/djangoapps/enrollments/views.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -769,20 +769,18 @@ def post(self, request):
769769
data={"message": ("'{value}' is an invalid enrollment activation status.").format(value=is_active)},
770770
)
771771

772-
# If the enrollment is associated with an enterprise customer, post the enrollment to the enterprise API
773-
# and calls the consent API
774-
explicit_linked_enterprise = request.data.get("linked_enterprise_customer")
772+
# Filter that executes enterprise-specific functions only if the enrollment is associated with an
773+
# enterprise customer
775774
try:
776-
user, course_id, explicit_linked_enterprise, has_api_key_permissions = CourseEnrollmentViewStarted.run_filter(
775+
user, course_id, has_api_key_permissions = CourseEnrollmentViewStarted.run_filter(
777776
user=user,
778777
course_key=course_id,
779-
linked_enterprise=explicit_linked_enterprise,
780778
has_api_key_permissions=has_api_key_permissions,
781779
)
782780
except CourseEnrollmentViewStarted.PreventEnrollment as e:
783781
return Response(
784782
status=status.HTTP_400_BAD_REQUEST,
785-
data={"message": str(e)},
783+
data={"message": str(e)}
786784
)
787785

788786
enrollment_attributes = request.data.get("enrollment_attributes")

0 commit comments

Comments
 (0)