Merge pull request #7931 from KanchanChauhan/job-applicant-fix

[Fix] Candidate can apply to multiple jobs
This commit is contained in:
Nabin Hait 2017-03-06 16:38:00 +05:30 committed by GitHub
commit 0697d62603

View File

@ -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)