fix: assessment plan error handling for course field (#23961)
* fix: assessment plan error handling for course field * fix: message rectification * fix(travis): clean-up tests * fix: travis * fix: tests Co-authored-by: pateljannat <jannatpatel@MacBook-Air.local> Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
This commit is contained in:
parent
1c362c81f2
commit
8aeadc743e
@ -124,7 +124,10 @@ class ProgramEnrollment(Document):
|
|||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
@frappe.validate_and_sanitize_search_inputs
|
@frappe.validate_and_sanitize_search_inputs
|
||||||
def get_program_courses(doctype, txt, searchfield, start, page_len, filters):
|
def get_program_courses(doctype, txt, searchfield, start, page_len, filters):
|
||||||
if filters.get('program'):
|
if not filters.get('program'):
|
||||||
|
frappe.msgprint(_("Please select a Program first."))
|
||||||
|
return []
|
||||||
|
|
||||||
return frappe.db.sql("""select course, course_name from `tabProgram Course`
|
return frappe.db.sql("""select course, course_name from `tabProgram Course`
|
||||||
where parent = %(program)s and course like %(txt)s {match_cond}
|
where parent = %(program)s and course like %(txt)s {match_cond}
|
||||||
order by
|
order by
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user