From 8411be772004dc3281154c13681b094b7c3a8a53 Mon Sep 17 00:00:00 2001 From: Kanchan Chauhan Date: Mon, 6 Mar 2017 14:40:43 +0530 Subject: [PATCH] [Fix] Candidate can apply to multiple jobs --- erpnext/hr/doctype/job_applicant/job_applicant.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/hr/doctype/job_applicant/job_applicant.py b/erpnext/hr/doctype/job_applicant/job_applicant.py index 66a060c019a..acc1c64d439 100644 --- a/erpnext/hr/doctype/job_applicant/job_applicant.py +++ b/erpnext/hr/doctype/job_applicant/job_applicant.py @@ -36,7 +36,7 @@ class JobApplicant(Document): def check_email_id_is_unique(self): if self.email_id: names = frappe.db.sql_list("""select name from `tabJob Applicant` - where email_id=%s and name!=%s""", (self.email_id, self.name)) + where email_id=%s and name!=%s and job_title=%s""", (self.email_id, self.name, self.job_title)) if names: frappe.throw(_("Email Address must be unique, already exists for {0}").format(comma_and(names)), frappe.DuplicateEntryError)