fix: add new batch form enhancements (#43) invite request doctype and flow (#42)

This commit is contained in:
pateljannat
2021-05-01 14:37:57 +05:30
parent 4bc05bfda8
commit 52f16131af
17 changed files with 323 additions and 40 deletions

View File

@@ -1,14 +1,16 @@
import frappe
from ...lms.doctype.lms_sketch.lms_sketch import get_recent_sketches
from community.lms.models import Sketch
def get_context(context):
context.no_cache = 1
context.username = frappe.form_dict["username"]
print(frappe.form_dict["username"])
context.member = get_member(context.username)
print(context.member)
if not context.member:
context.template = "www/404.html"
else:
context.sketches = list(filter(lambda x: x.owner == context.member.email, get_recent_sketches()))
context.sketches = list(filter(lambda x: x.owner == context.member.email, Sketch.get_recent_sketches()))
def get_member(username):
try: