fix: made image non mandatory, remove unnecessary code

This commit is contained in:
pateljannat
2021-07-09 15:05:46 +05:30
parent d939a63412
commit 71d0a89968
4 changed files with 3 additions and 9 deletions

View File

@@ -167,8 +167,7 @@ whitelist = [
"/add-a-new-batch",
"/new-sign-up",
"/message",
"/about",
"/review"
"/about"
]
whitelist_rules = [{"from_route": p, "to_route": p[1:]} for p in whitelist]

View File

@@ -86,8 +86,7 @@
{
"fieldname": "image",
"fieldtype": "Attach Image",
"label": "Preview Image",
"reqd": 1
"label": "Preview Image"
},
{
"fieldname": "tags",
@@ -119,7 +118,7 @@
"link_fieldname": "course"
}
],
"modified": "2021-06-28 12:04:21.524161",
"modified": "2021-07-09 15:05:05.372430",
"modified_by": "Administrator",
"module": "LMS",
"name": "LMS Course",

View File

@@ -17,7 +17,6 @@ def get_common_context(context):
context.course = course
membership = course.get_membership(frappe.session.user, batch_name)
print(membership)
context.membership = membership
if membership:
batch = course.get_batch(membership.batch)

View File

@@ -19,6 +19,3 @@ def get_context(context):
membership = course.get_membership(frappe.session.user)
context.course.query_parameter = "?batch=" + membership.batch if membership and membership.batch else ""
context.membership = membership
if not course.is_mentor(frappe.session.user) and membership:
""" frappe.local.flags.redirect_location = f"/courses/{course.name}/learn"
raise frappe.Redirect """