From b7084b899597d37e2c77d4fe968e9c8ea8ca1f10 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 7 Feb 2013 18:15:04 +0530 Subject: [PATCH] Update hr/doctype/appraisal/appraisal.py fixed issue in appraisal --- hr/doctype/appraisal/appraisal.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hr/doctype/appraisal/appraisal.py b/hr/doctype/appraisal/appraisal.py index 849e48ac37..3d49c311d9 100644 --- a/hr/doctype/appraisal/appraisal.py +++ b/hr/doctype/appraisal/appraisal.py @@ -77,10 +77,9 @@ class DocType: msgprint("Total weightage assigned should be 100%. It is :" + str(total_w) + "%", raise_exception=1) - if webnotes.conn.get_default("employee", webnotes.session.user) != self.doc.employee: - - if total==0: - msgprint("Total can't be zero. You must atleast give some points!", raise_exception=1) + if webnotes.conn.get_value("Employee", self.doc.employee, "user_id") != \ + webnotes.session.user and total == 0: + msgprint("Total can't be zero. You must atleast give some points!", raise_exception=1) self.doc.total_score = total