From ddfada176f641bdc7a693958eb1d901f98a77f11 Mon Sep 17 00:00:00 2001 From: Bryan Wilson Date: Wed, 15 Mar 2023 13:07:37 -0700 Subject: [PATCH] Check for presence of batchEnroll.reason_field Match edx-platform changes from c926a13 Reason field for batch enrollments may not be present. (this membership.js does not seem to be used in Tahoe staging/prod as bundled with other instructor_dashboard JS and stored in our S3, but is affecting devstack --- lms/static/js/instructor_dashboard/membership.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lms/static/js/instructor_dashboard/membership.js b/lms/static/js/instructor_dashboard/membership.js index 3f09aa6f..7fb4e98c 100644 --- a/lms/static/js/instructor_dashboard/membership.js +++ b/lms/static/js/instructor_dashboard/membership.js @@ -603,7 +603,7 @@ such that the value can be defined later than this assignment (file load order). this.$request_response_error = this.$container.find('.request-response-error'); this.$enrollment_button.click(function(event) { var sendData; - if (!batchEnroll.$reason_field.val()) { + if (batchEnroll.$reason_field.length && !batchEnroll.$reason_field.val()) { batchEnroll.fail_with_error(gettext('Reason field should not be left blank.')); return false; }