[hotfix] fixed mysql syntax error in Student and Guardian Contact Details report (#10450)

This commit is contained in:
Makarand Bauskar 2017-08-21 07:34:45 +05:30 committed by GitHub
parent fe43ecb5ee
commit 80d06da978

View File

@ -82,7 +82,7 @@ def get_guardian_map(student_list):
select parent, guardian, guardian_name, relation from `tabStudent Guardian` where parent in (%s)''' %
', '.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`
where name in (%s)""" % ", ".join(['%s']*len(guardian_list)), tuple(guardian_list)))