[hotfix] fixed mysql syntax error in Student and Guardian Contact Details report (#10450)
This commit is contained in:
parent
fe43ecb5ee
commit
80d06da978
@ -82,7 +82,7 @@ def get_guardian_map(student_list):
|
|||||||
select parent, guardian, guardian_name, relation from `tabStudent Guardian` where parent in (%s)''' %
|
select parent, guardian, guardian_name, relation from `tabStudent Guardian` where parent in (%s)''' %
|
||||||
', '.join(['%s']*len(student_list)), tuple(student_list), as_dict=1)
|
', '.join(['%s']*len(student_list)), tuple(student_list), as_dict=1)
|
||||||
|
|
||||||
guardian_list = list(set([g.guardian for g in guardian_details]))
|
guardian_list = list(set([g.guardian for g in guardian_details])) or ['']
|
||||||
|
|
||||||
guardian_mobile_no = dict(frappe.db.sql("""select name, mobile_number from `tabGuardian`
|
guardian_mobile_no = dict(frappe.db.sql("""select name, mobile_number from `tabGuardian`
|
||||||
where name in (%s)""" % ", ".join(['%s']*len(guardian_list)), tuple(guardian_list)))
|
where name in (%s)""" % ", ".join(['%s']*len(guardian_list)), tuple(guardian_list)))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user