Skip to content

Commit

Permalink
fix: redirect to login if guest before batch enrollment
Browse files Browse the repository at this point in the history
  • Loading branch information
pateljannat committed Jan 22, 2024
1 parent b700013 commit d3b3d85
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lms/www/batches/batch_details.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ const show_course_modal = (e) => {

const enroll_batch = (e) => {
let batch_name = $(".class-details").data("batch");
if (frappe.session.user == "Guest") {
window.location.href =
"/login?redirect-to=/batches/details/" + batch_name;
}
frappe.call({
method: "lms.lms.doctype.batch_student.batch_student.enroll_batch",
args: {
Expand Down

0 comments on commit d3b3d85

Please sign in to comment.