From df489bdf6e0b18690fd82cebbac2a195f7557b53 Mon Sep 17 00:00:00 2001 From: pkulkark Date: Tue, 5 Jul 2022 14:27:31 +0530 Subject: [PATCH] fix: Check if feature is enabled before calling enterprise api This fixes the issue of django messages being read before redirecting to dashboard page, due to enterprise api being called even if the feature is disabled. --- lms/static/js/student_account/views/AccessView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lms/static/js/student_account/views/AccessView.js b/lms/static/js/student_account/views/AccessView.js index c460f3b907..295b355b40 100644 --- a/lms/static/js/student_account/views/AccessView.js +++ b/lms/static/js/student_account/views/AccessView.js @@ -173,7 +173,7 @@ this.listenTo(this.subview.login, 'password-help', this.resetPassword); // Listen for 'auth-complete' event so we can enroll/redirect the user appropriately. - if (!isTpaSaml) { + if (this.isEnterpriseEnable == true && !isTpaSaml) { this.listenTo(this.subview.login, 'auth-complete', this.loginComplete); } else { this.listenTo(this.subview.login, 'auth-complete', this.authComplete);