refactor: removed the slug using the course name as part of url
This commit is contained in:
@@ -7,12 +7,12 @@ def get_context(context):
|
||||
context.no_cache = 1
|
||||
|
||||
try:
|
||||
course_slug = frappe.form_dict["course"]
|
||||
course_name = frappe.form_dict["course"]
|
||||
except KeyError:
|
||||
frappe.local.flags.redirect_location = "/courses"
|
||||
raise frappe.Redirect
|
||||
|
||||
course = Course.find(course_slug)
|
||||
course = Course.find(course_name)
|
||||
if course is None:
|
||||
frappe.local.flags.redirect_location = "/courses"
|
||||
raise frappe.Redirect
|
||||
|
||||
Reference in New Issue
Block a user